Created 02-06-2018 03:30 PM
hi all
sometimes after we finished to install ambari cluster by the scripts ( ambari cluster include 3 masters machine and workers machines between 2 to 24 machines )
some components are down ,
so we want to give a second try and to start only the components / services that are down
what is the API for that
Created 02-06-2018 03:50 PM
You can use the below API
curl -u {ambari-username}:{ambari-password} -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.ALL_SERVICES","operation_level":{"level":"CLUSTER","cluster_name":"hdp"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' http://{ambari-host}:{ambari-port}/api/v1/clusters/{cluster-name}/services
Replace ambari-username, ambari-password, ambari-host, ambari-port, cluster-name with respective values
Note: Cluster Name should be replaced in 2 places. One in the url {cluster-name} and the other one in the json which I put as hdp
Thanks,
Aditya
Created 02-06-2018 03:50 PM
You can use the below API
curl -u {ambari-username}:{ambari-password} -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.START.ALL_SERVICES","operation_level":{"level":"CLUSTER","cluster_name":"hdp"}},"Body":{"ServiceInfo":{"state":"STARTED"}}}' http://{ambari-host}:{ambari-port}/api/v1/clusters/{cluster-name}/services
Replace ambari-username, ambari-password, ambari-host, ambari-port, cluster-name with respective values
Note: Cluster Name should be replaced in 2 places. One in the url {cluster-name} and the other one in the json which I put as hdp
Thanks,
Aditya