<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question API + how to set both thrift server in ambari to maintenance mode in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/API-how-to-set-both-thrift-server-in-ambari-to-maintenance/m-p/237891#M199703</link>
    <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;API + how to set both thrift server in ambari to maintenance mode&lt;/P&gt;&lt;P&gt;we need to stop both shrift server services , and to set them to maintenance mode&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="107652-capture.png" style="width: 729px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14173i9EE4759F11B73F20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="107652-capture.png" alt="107652-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;stop both thrift server by API&lt;/P&gt;&lt;P&gt;and set both thrift server to maintenance mode by API&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Aug 2019 23:07:16 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-08-17T23:07:16Z</dc:date>
    <item>
      <title>API + how to set both thrift server in ambari to maintenance mode</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-how-to-set-both-thrift-server-in-ambari-to-maintenance/m-p/237891#M199703</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;API + how to set both thrift server in ambari to maintenance mode&lt;/P&gt;&lt;P&gt;we need to stop both shrift server services , and to set them to maintenance mode&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="107652-capture.png" style="width: 729px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14173i9EE4759F11B73F20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="107652-capture.png" alt="107652-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;stop both thrift server by API&lt;/P&gt;&lt;P&gt;and set both thrift server to maintenance mode by API&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 23:07:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-how-to-set-both-thrift-server-in-ambari-to-maintenance/m-p/237891#M199703</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-17T23:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: API + how to set both thrift server in ambari to maintenance mode</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-how-to-set-both-thrift-server-in-ambari-to-maintenance/m-p/237892#M199704</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Find the hostnames where the "SPARK2_THRIFTSERVER" server is running:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts?(host_components/HostRoles/component_name=SPARK2_THRIFTSERVER)&amp;amp;minimal_response=true" &amp;nbsp;| grep host_name | awk -F":" '{print $2}' | &amp;nbsp;awk -F"\"" '{print $2}'&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Example Output:&lt;/STRONG&gt;&lt;BR /&gt;newhwx3.example.com&lt;BR /&gt;newhwx5.example.com&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Once we know the hosts where the "SPARK2_THRIFTSERVER" is running then we can run the following command by replacing the host newhws3 and newhwx5 to turn ON the maintenance mode for it.&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Turn ON Maintenance Mode for Spark2 Thrift Server"},"Body":{"HostRoles":{"maintenance_state":"ON"}}}' "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx3.example.com/host_components/SPARK2_THRIFTSERVER"

# curl -H "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Turn ON Maintenance Mode for Spark2 Thrift Server"},"Body":{"HostRoles":{"maintenance_state":"ON"}}}' "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx5.example.com/host_components/SPARK2_THRIFTSERVER"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Turn OFF maintenance Mode for Spark2 thrift server on newhwx3 and newhws5&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Turn OFF Maintenance Mode for Spark2 Thrift Server"},"Body":{"HostRoles":{"maintenance_state":"OFF"}}}' "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx3.example.com/host_components/SPARK2_THRIFTSERVER"

# curl -H "X-Requested-By: ambari" -u admin:admin -X PUT -d '{"RequestInfo":{"context":"Turn OFF Maintenance Mode for Spark2 Thrift Server"},"Body":{"HostRoles":{"maintenance_state":"OFF"}}}' "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx5.example.com/host_components/SPARK2_THRIFTSERVER"&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 03:08:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-how-to-set-both-thrift-server-in-ambari-to-maintenance/m-p/237892#M199704</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-04-07T03:08:41Z</dc:date>
    </item>
  </channel>
</rss>

