<?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: API + namenode status in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242522#M204323</link>
    <description>&lt;PRE&gt;what we get is only that&lt;/PRE&gt;&lt;PRE&gt; curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://name2:8080/api/v1/clusters/clu45/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesytem/HAState=standby"
{
  "href" : "http://name2:8080/api/v1/clusters/clu45/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby",
  "items" : [ ]&lt;/PRE&gt;</description>
    <pubDate>Mon, 21 Jan 2019 14:12:45 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-01-21T14:12:45Z</dc:date>
    <item>
      <title>API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242518#M204319</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;we want to verify the name nodes status from ambari by API ( namenode adtive/stand by under hdfs )&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/96766-capture.png"&gt;capture.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;is it possible to create API for that?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 13:29:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242518#M204319</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-21T13:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242519#M204320</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;You can make use of the Ambari API call:&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active" target="_blank"&gt;http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active&lt;/A&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jan 2019 13:54:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242519#M204320</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-01-21T13:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242520#M204321</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:  &lt;/STRONG&gt;Please check the &lt;STRONG&gt;"HAState" &lt;/STRONG&gt;field value.&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active"
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{
  "href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active",
  "items" : [
    {
      "href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/hosts/hdfcluster1.example.com/host_components/NAMENODE",
      "HostRoles" : {
        "cluster_name" : "TestCluster",
        "component_name" : "NAMENODE",
        "host_name" : "hdfcluster1.example.com"
      },
      "host" : {
        "href" : "http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/hosts/hdfcluster1.example.com"
      },
      "metrics" : {
        "dfs" : {
          "FSNamesystem" : {
            "HAState" : "active"
          }
        }
      }
    }
  ]
}&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 13:57:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242520#M204321</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-01-21T13:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242521#M204322</link>
      <description>&lt;P&gt;@Jay what should be the HAState for the standby machine ?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:04:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242521#M204322</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-21T14:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242522#M204323</link>
      <description>&lt;PRE&gt;what we get is only that&lt;/PRE&gt;&lt;PRE&gt; curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://name2:8080/api/v1/clusters/clu45/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesytem/HAState=standby"
{
  "href" : "http://name2:8080/api/v1/clusters/clu45/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby",
  "items" : [ ]&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Jan 2019 14:12:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242522#M204323</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-21T14:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: API + namenode status</title>
      <link>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242523#M204324</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is a Type in your URL.   The &lt;STRONG&gt;spelling of   "FSNamesytem"&lt;/STRONG&gt;   (should be "FSName&lt;STRONG&gt;sys&lt;/STRONG&gt;tem")  one character &lt;STRONG&gt;'s' &lt;/STRONG&gt;is missing in the word.&lt;/P&gt;&lt;P&gt;So please try this:&lt;/P&gt;&lt;PRE&gt;# curl -u admin:admin -H "X-Requested-By: ambari" -X GET "http://name2:8080/api/v1/clusters/clu45/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=standby&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 17:53:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/API-namenode-status/m-p/242523#M204324</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-01-21T17:53:18Z</dc:date>
    </item>
  </channel>
</rss>

