<?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 how to know if any service in ambari cluster need to restart by API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-know-if-any-service-in-ambari-cluster-need-to-restart/m-p/228707#M67346</link>
    <description>&lt;P&gt;the following API will restart all services that restart action is required ( after paramter changes )&lt;/P&gt;&lt;P&gt;but how to know if any service in ambari cluster need to restart by API ( I mean just to check if restart is needed without to perform restart ? ) &lt;/P&gt;&lt;P&gt;# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST  -d '{"RequestInfo":{"command":"RESTART","context":"Restart all required services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}' &lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/reques" target="_blank"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/reques&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Aug 2017 14:56:56 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2017-08-27T14:56:56Z</dc:date>
    <item>
      <title>how to know if any service in ambari cluster need to restart by API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-know-if-any-service-in-ambari-cluster-need-to-restart/m-p/228707#M67346</link>
      <description>&lt;P&gt;the following API will restart all services that restart action is required ( after paramter changes )&lt;/P&gt;&lt;P&gt;but how to know if any service in ambari cluster need to restart by API ( I mean just to check if restart is needed without to perform restart ? ) &lt;/P&gt;&lt;P&gt;# curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST  -d '{"RequestInfo":{"command":"RESTART","context":"Restart all required services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}' &lt;A href="http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/reques" target="_blank"&gt;http://$AMBARI_SERVER:8080/api/v1/clusters/$CLUSTER_NAME/reques&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 14:56:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-know-if-any-service-in-ambari-cluster-need-to-restart/m-p/228707#M67346</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-08-27T14:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to know if any service in ambari cluster need to restart by API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-know-if-any-service-in-ambari-cluster-need-to-restart/m-p/228708#M67347</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@uri ben-ari&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following should list all the components that has stale config, and need to be restaretd to get the config changes reflected.&lt;/P&gt;&lt;PRE&gt;# curl -i --user admin:admin -i -H 'X-Requested-By: ambari' -X GET  &lt;A href="http://localhost:8080/api/v1/clusters/Sandbox/host_components?HostRoles/stale_configs=true" target="_blank"&gt;http://localhost:8080/api/v1/clusters/Sandbox/host_components?HostRoles/stale_configs=true&lt;/A&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Here please replace the following:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1. "localhost" : with the Ambari FQDN&lt;/P&gt;&lt;P&gt;2. 8080 : with ambari port.&lt;/P&gt;&lt;P&gt;3. Sandbox : With cluster Name&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 18:09:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-know-if-any-service-in-ambari-cluster-need-to-restart/m-p/228708#M67347</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-08-27T18:09:56Z</dc:date>
    </item>
  </channel>
</rss>

