You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

NOTE: This assumes the cluster is already installed.

Stopping/Starting a Service/Host Components.

1. Starting HDFS service
curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Start HDFS via REST"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' http://CLUSTER_NAME:8080/api/v1/clusters/CLUSTER_NAME/services/HDFS
2. Stopping HDFS service
curl -u admin:$PASSWORD -i -H 'X-Requested-By: ambari' -X PUT -d '{"RequestInfo": {"context" :"Stop HDFS via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/HDFS

 

3. Starting/Stopping individual daemons (example Ganglia Monitor / Datanodes).
curl --user admin:admin -i -h 'X-Requested-By: ambari' -X PUT -d '{"HostRoles": {"state": "STARTED"}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/NEW_HOST_ADDED/host_components/GANGLIA_MONITOR
curl --user admin:admin -i -h 'X-Requested-By: ambari' -X PUT -d '{"HostRoles": {"state": "INSTALLED"}}' http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/NEW_HOST_ADDED/host_components/DATANODE
  • No labels