Skip to main content
mike_bronson7
Gold ⭐️⭐️⭐️
July 8, 2019
Solved

how to stop the thrift servers by REST API



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



mike_bronson7
Gold ⭐️⭐️⭐️
July 8, 2019
  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

1 reply

mike_bronson7
mike_bronson7AuthorAnswer
Gold ⭐️⭐️⭐️
July 8, 2019
  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
Translate
Michael-Bronson