<?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: Ambari rest API to get host of particular components. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174448#M37800</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12489/bhargavchowdare.html" nodeid="12489"&gt;@bob bza&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You may also find the information you see in this article: &lt;A href="https://community.hortonworks.com/content/kbentry/136986/using-ambari-to-automate-knox-topology-definitions.html"&gt;Using Ambari to Automate Knox Topology Definitions&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Specifically, while the following API will get you all the host component details, including the host(s),&lt;/P&gt;&lt;H4&gt;&lt;/H4&gt;&lt;P&gt;&lt;STRONG&gt;     api/v1/clusters/&lt;EM&gt;clustername&lt;/EM&gt;/services/YARN/components/RESOURCEMANAGER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it will not get you the appropriate ports.&lt;/P&gt;&lt;P&gt;For that, you need to interrogate the active YARN service configuration:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;     api/v1/clusters/&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;clustername&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;/configurations/service_config_versions?service_name=YARN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And look for the &lt;STRONG&gt;yarn-site&lt;/STRONG&gt; configuration type, and the following properties therein:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;yarn.http.policy&lt;/STRONG&gt;&lt;BR /&gt;This will tell you if http is sufficient, or if you need to use https&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;yarn.resourcemanager.address&lt;/STRONG&gt;&lt;BR /&gt;The value of this property is the HOST:PORT address you originally requested.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope that helps...&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2017 07:13:21 GMT</pubDate>
    <dc:creator>pzampino</dc:creator>
    <dc:date>2017-09-29T07:13:21Z</dc:date>
    <item>
      <title>Ambari rest API to get host of particular components.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174446#M37798</link>
      <description>&lt;P&gt;Here i just want to get my resource manager hostip and its port.&lt;/P&gt;&lt;P&gt;example : -:   &lt;A href="http://IP:8088" target="_blank"&gt;http://IP:8088&lt;/A&gt;, &lt;A href="http://IP:50070" target="_blank"&gt;http://IP:50070&lt;/A&gt;, &lt;A href="http://IP:19888" target="_blank"&gt;http://IP:19888&lt;/A&gt;.  &lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 04:00:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174446#M37798</guid>
      <dc:creator>bhargavchowdare</dc:creator>
      <dc:date>2016-08-15T04:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari rest API to get host of particular components.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174447#M37799</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/12489/bhargavchowdare.html"&gt;bob bza&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Let's start with: &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Get a list of services: &lt;/P&gt;&lt;P&gt;GET /clusters/:name/services &lt;/P&gt;&lt;P&gt;For any of the services listed, including ResourceManager, view service information: &lt;/P&gt;&lt;P&gt;GET /clusters/:clusterName/services/:serviceName &lt;/P&gt;&lt;P&gt;Of course, prepend the GET statements with:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;curl -u admin:admin -H &lt;/CODE&gt;&lt;CODE&gt;"X-Requested-By: ambari"&lt;/CODE&gt;&lt;CODE&gt;-X&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;Another useful reference: &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please vote/accept answer, if helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 08:23:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174447#M37799</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-08-15T08:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari rest API to get host of particular components.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174448#M37800</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12489/bhargavchowdare.html" nodeid="12489"&gt;@bob bza&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You may also find the information you see in this article: &lt;A href="https://community.hortonworks.com/content/kbentry/136986/using-ambari-to-automate-knox-topology-definitions.html"&gt;Using Ambari to Automate Knox Topology Definitions&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Specifically, while the following API will get you all the host component details, including the host(s),&lt;/P&gt;&lt;H4&gt;&lt;/H4&gt;&lt;P&gt;&lt;STRONG&gt;     api/v1/clusters/&lt;EM&gt;clustername&lt;/EM&gt;/services/YARN/components/RESOURCEMANAGER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it will not get you the appropriate ports.&lt;/P&gt;&lt;P&gt;For that, you need to interrogate the active YARN service configuration:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;     api/v1/clusters/&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;clustername&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;/configurations/service_config_versions?service_name=YARN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And look for the &lt;STRONG&gt;yarn-site&lt;/STRONG&gt; configuration type, and the following properties therein:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;yarn.http.policy&lt;/STRONG&gt;&lt;BR /&gt;This will tell you if http is sufficient, or if you need to use https&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;yarn.resourcemanager.address&lt;/STRONG&gt;&lt;BR /&gt;The value of this property is the HOST:PORT address you originally requested.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope that helps...&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 07:13:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-rest-API-to-get-host-of-particular-components/m-p/174448#M37800</guid>
      <dc:creator>pzampino</dc:creator>
      <dc:date>2017-09-29T07:13:21Z</dc:date>
    </item>
  </channel>
</rss>

