<?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 Re: Can anyone tell me REST API to put the host component in maintenance mode through REST API? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115568#M22176</link>
    <description>&lt;P&gt;You are invoking the API to stop nodemanager (not put in maintenance mode). &lt;/P&gt;&lt;P&gt;To put it in maintenance mode, try below:&lt;/P&gt;&lt;PRE&gt;curl -u admin:OpsAm-iAp1Pass -H "X-Requested-By:ambari"-i -X PUT -d '{"RequestInfo":{"context":"Turn On Maintenance Mode For NodeManaager"}, "Body":{"HostRoles":{"maintenance_state":"ON"}}}' &lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE"&gt;http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/N&lt;/A&gt;ODEMANAGER&lt;/PRE&gt;&lt;P&gt;&lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE"&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2016 01:54:28 GMT</pubDate>
    <dc:creator>abajwa</dc:creator>
    <dc:date>2016-03-10T01:54:28Z</dc:date>
    <item>
      <title>Can anyone tell me REST API to put the host component in maintenance mode through REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115565#M22173</link>
      <description>&lt;P&gt;I tried this one.. &lt;/P&gt;&lt;P&gt;curl -u admin:OpsAm-iAp1Pass -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Turn on Maintenance mode"}, "Body":{"ServiceInfo":{"maintenance state":"ON"}}}' &lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE" target="_blank"&gt;http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Result :&lt;/P&gt;&lt;P&gt;HTTP/1.1 200 OK
User: admin
Set-Cookie: AMBARISESSIONID=1acil15v0h4ve2hk9a1ac5gux;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 0
Server: Jetty(8.1.17.v20150415)&lt;/P&gt;&lt;P&gt;I checked in ambari dashboard, nothing happend..&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 05:44:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115565#M22173</guid>
      <dc:creator>prasad4u_com</dc:creator>
      <dc:date>2016-03-08T05:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone tell me REST API to put the host component in maintenance mode through REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115566#M22174</link>
      <description>&lt;P&gt;Use the below command instead. Note that to check whether datanode was put into maintenance mode, you will need to go to the Hosts tab in Ambari, navigate to the host running datanode and look for the maintenance icon there (ie the icon won't show up under Ambari &amp;gt; HDFS &amp;gt; Datanode because its a 'slave' component)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2673-screen-shot-2016-03-07-at-21558-pm.png" style="width: 1120px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23080i4825650534CA6015/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2673-screen-shot-2016-03-07-at-21558-pm.png" alt="2673-screen-shot-2016-03-07-at-21558-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;curl -u admin:OpsAm-iAp1Pass -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Turn On Maintenance Mode For DataNode"}, "Body":{"HostRoles":{"maintenance_state":"ON"}}}' &lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE" target="_blank" rel="nofollow noopener noreferrer"&gt;http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE&lt;/A&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Aug 2019 10:58:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115566#M22174</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2019-08-19T10:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone tell me REST API to put the host component in maintenance mode through REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115567#M22175</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;@Ali Bajwa&lt;/A&gt; I tried same for NODEMANAGER, i am getting http 200 code. Its not getting excuted. Here is my command. Can you please tell me is there anything wrong?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;curl -u admin:OpsAm-iAp1Pass -H "X-Requested-By:ambari" -i -X PUT -d '{"RequestInfo":{"context":"Stop NODEMANAGER"}, "Body":{"HostRoles":{"state":"INSTALLED"}}}' &lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/NODEMANAGER"&gt;http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/NODEMANAGER&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you in advance.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 23:11:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115567#M22175</guid>
      <dc:creator>prasad4u_com</dc:creator>
      <dc:date>2016-03-08T23:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone tell me REST API to put the host component in maintenance mode through REST API?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115568#M22176</link>
      <description>&lt;P&gt;You are invoking the API to stop nodemanager (not put in maintenance mode). &lt;/P&gt;&lt;P&gt;To put it in maintenance mode, try below:&lt;/P&gt;&lt;PRE&gt;curl -u admin:OpsAm-iAp1Pass -H "X-Requested-By:ambari"-i -X PUT -d '{"RequestInfo":{"context":"Turn On Maintenance Mode For NodeManaager"}, "Body":{"HostRoles":{"maintenance_state":"ON"}}}' &lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE"&gt;http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/N&lt;/A&gt;ODEMANAGER&lt;/PRE&gt;&lt;P&gt;&lt;A href="http://viceroy10:8080/api/v1/clusters/et_cluster/hosts/serf120int.etops.tllsc.net/host_components/DATANODE"&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 01:54:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Can-anyone-tell-me-REST-API-to-put-the-host-component-in/m-p/115568#M22176</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2016-03-10T01:54:28Z</dc:date>
    </item>
  </channel>
</rss>

