Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to stop the thrift servers by REST API

Solved Go to solution

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



Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to stop the thrift servers by REST API

  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 1

Re: how to stop the thrift servers by REST API

  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