Support Questions

Find answers, ask questions, and share your expertise

how to stop the thrift servers by REST API

avatar



hi all


we have two spark thrift servers component in our ambari cluster


one thrift server is on master01 machine

and the second is on master03 machine


how to stop the thrift server component on master01 and master03 machine by REST API



109747-capture.png



Michael-Bronson
1 ACCEPTED SOLUTION

avatar
  1. // Getting the state of the component ( replace YARN_CLIENT to SPARK2_THRIFTSERVER )
  2. curl -u admin:admin -H "X-Requested-By:ambari" -i -X GET
  3. http://<HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOST_FQDN>/host_components/YARN_CLIENT
  4. // Setting the state of the component to INSTALLED
  5. curl -u admin:admin -H "X-Requested-By:ambari" -i -X PUT
  6. -d '{"RequestInfo":{"context":"Install YARN_CLIENT"}, "Body":{"HostRoles":{"state":"INSTALLED"}}}' http://<HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOST_FQDN>/host_components/YARN_CLIENT
Michael-Bronson

View solution in original post

1 REPLY 1

avatar
  1. // Getting the state of the component ( replace YARN_CLIENT to SPARK2_THRIFTSERVER )
  2. curl -u admin:admin -H "X-Requested-By:ambari" -i -X GET
  3. http://<HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOST_FQDN>/host_components/YARN_CLIENT
  4. // Setting the state of the component to INSTALLED
  5. curl -u admin:admin -H "X-Requested-By:ambari" -i -X PUT
  6. -d '{"RequestInfo":{"context":"Install YARN_CLIENT"}, "Body":{"HostRoles":{"state":"INSTALLED"}}}' http://<HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<HOST_FQDN>/host_components/YARN_CLIENT
Michael-Bronson