Service Resources

Service resources are services of a Hadoop cluster (e.g. HDFS, MapReduce and Ganglia). Service resources are sub-resources of clusters.

###API Summary

###Properties

###States

The current state of a service resource can be determined by looking at the ServiceInfo/state property.

GET api/v1/clusters/c1/services/HDFS?fields=ServiceInfo/state

200 OK
{
  "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HDFS?fields=ServiceInfo/state",
  "ServiceInfo" : {
    "cluster_name" : "c1",
    "state" : "INSTALLED",
    "service_name" : "HDFS"
  }
}

The following table lists the possible values of the service resource ServiceInfo/state property.

###Starting a Service A service can be started through the API by setting its state to be STARTED (see update service).

###Stopping a Service A service can be stopped through the API by setting its state to be INSTALLED (see update service).