public class RESTApiClusterManager
A ClusterManager implementation designed to control Cloudera Manager (http://www.cloudera.com)
clusters via REST API. This API uses HTTP GET requests against the cluster manager server to
retrieve information and POST/PUT requests to perform actions. As a simple example, to retrieve a
list of hosts from a CM server with login credentials admin:admin, a simple curl command would be
curl -X POST -H "Content-Type:application/json" -u admin:admin \
This command would return a JSON result, which would need to be parsed to retrieve relevant
information. This action and many others are covered by this class.
A note on nomenclature: while the ClusterManager interface uses a ServiceType enum when
referring to things like RegionServers and DataNodes, cluster managers often use different
terminology. As an example, Cloudera Manager (http://www.cloudera.com) would refer to a
RegionServer as a "role" of the HBase "service." It would further refer to "hbase" as the
"serviceType." Apache Ambari (http://ambari.apache.org) would call the RegionServer a
"component" of the HBase "service."
This class will defer to the ClusterManager terminology in methods that it implements from
that interface, but uses Cloudera Manager's terminology when dealing with its API directly.