Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (2)
Cloudera Employee

STOP Command::

curl -u admin:admin -H "X-Requested-By:ambari" -i -X PUT http://172.26.78.29:8080/api/v1/clusters/Mycluster/hosts/prakash-ambariagent-node3/host_components/F... -d '{"RequestInfo":{"context":"Stop Flume","operation_level":{"level":"HOST_COMPONENT","cluster_name":"Mycluster","host_name":"prakash-ambariagent-node3","service_name":"FLUME"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}'

START Command::

curl -u admin:admin -H "X-Requested-By:ambari" -i -X PUT http://172.26.78.29:8080/api/v1/clusters/Mycluster/hosts/prakash-ambariagent-node3/host_components/F... -d '{"RequestInfo":{"context":"Start Flume","operation_level":{"level":"HOST_COMPONENT","cluster_name":"Mycluster","host_name":"prakash-ambariagent-node3","service_name":"FLUME"}},"Body":{"HostRoles":{"state":"STARTED"}}}'

RESTART Command::

curl --insecure -v -u admin:admin -H "X-Requested-By:ambari" -i -X POST http://prakash-ambariserver-node1:8080/api/v1/clusters/Mycluster/requests -d '{"RequestInfo":{"command":"RESTART","context":"Restart all components for Flume","operation_level":{"level":"SERVICE","cluster_name":"Mycluster","service_name":"FLUME"}},"Requests/resource_filters":[{"service_name":"FLUME","component_name":"FLUME_HANDLER","hosts":"prakash-ambariagent-node3"}]}'

Note::Replace the ambari server host and clustername with your cluster details and execute the curl commands.

208 Views
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎02-05-2019 12:21 PM
Updated by:
 
Contributors
Top Kudoed Authors