<?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: How to find active namenode from cli in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317348#M227136</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;You can use the below ambari api to get the Active NN:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://%7Bhost%7D:8080/api/v1/clusters/%7BCLUSTER_NAME%7D/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active" target="_blank" rel="nofollow noopener noreferrer"&gt;http://{HOST}:8080/api/v1/clusters/{CLUSTER_NAME}/host_components?HostRoles/component_name=NAMENODE&amp;amp;...&lt;/A&gt;&lt;/PRE&gt;&lt;DIV class="view-original-post-link"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Sun, 30 May 2021 13:19:22 GMT</pubDate>
    <dc:creator>vamsi_redd</dc:creator>
    <dc:date>2021-05-30T13:19:22Z</dc:date>
    <item>
      <title>How to find active namenode from cli</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317346#M227134</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to find active name node from cli and also want to know where to check automatic namenode failover triggered in the cluster?&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 11:31:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317346#M227134</guid>
      <dc:creator>khanarshadazmat</dc:creator>
      <dc:date>2021-05-30T11:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find active namenode from cli</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317348#M227136</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;You can use the below ambari api to get the Active NN:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;A href="http://%7Bhost%7D:8080/api/v1/clusters/%7BCLUSTER_NAME%7D/host_components?HostRoles/component_name=NAMENODE&amp;amp;metrics/dfs/FSNamesystem/HAState=active" target="_blank" rel="nofollow noopener noreferrer"&gt;http://{HOST}:8080/api/v1/clusters/{CLUSTER_NAME}/host_components?HostRoles/component_name=NAMENODE&amp;amp;...&lt;/A&gt;&lt;/PRE&gt;&lt;DIV class="view-original-post-link"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 30 May 2021 13:19:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317348#M227136</guid>
      <dc:creator>vamsi_redd</dc:creator>
      <dc:date>2021-05-30T13:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to find active namenode from cli</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317365#M227146</link>
      <description>&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/72413"&gt;@vamsi_redd&lt;/a&gt;&amp;nbsp;for helping us with Ambari API.&lt;/P&gt;&lt;P&gt;Do you have the same API for Cloudera Manager as well?&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 06:39:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317365#M227146</guid>
      <dc:creator>khanarshadazmat</dc:creator>
      <dc:date>2021-05-31T06:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to find active namenode from cli</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317388#M227147</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/53657"&gt;@khanarshadazmat&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may get the role information using CM API for HDFS service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;API:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://archive.cloudera.com/cm7/7.2.4/generic/jar/cm_api/apidocs/resource_RolesResource.html#resource_RolesResource_ClustersResourceV43_ServicesResourceV42_RolesResourceV41_readRoles_GET" target="_blank" rel="noopener"&gt;https://archive.cloudera.com/cm7/7.2.4/generic/jar/cm_api/apidocs/resource_RolesResource.html#resource_RolesResource_ClustersResourceV43_ServicesResourceV42_RolesResourceV41_readRoles_GET&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the below example for a better understanding:&lt;/P&gt;&lt;P&gt;• When I execute the above API, I would get the below details for HDFS service:&lt;/P&gt;&lt;PRE&gt; "name" : "HDFS-1-NAMENODE-cb7144bc695976e34cfbaaf26c176d21",
    "type" : "NAMENODE",
    "serviceRef" : {
      "clusterName" : "Cluster 1",
      "serviceName" : "HDFS-1",
      "serviceDisplayName" : "HDFS-1",
      "serviceType" : "HDFS"
    },&lt;BR /&gt;...
    "roleState" : "STARTED",
    "healthSummary" : "GOOD",
    "configStalenessStatus" : "FRESH",
    "haStatus" : "STANDBY",
    "maintenanceMode" : false,
    "commissionState" : "COMMISSIONED",
    "roleConfigGroupRef" : {
      "roleConfigGroupName" : "HDFS-1-NAMENODE-BASE"
    },&lt;/PRE&gt;&lt;P&gt;• and, for the second namenode, I'll get something as below:&lt;/P&gt;&lt;PRE&gt;"name" : "HDFS-1-NAMENODE-b1d777dd6714507397225b07ea9057ce",
    "type" : "NAMENODE",
    "serviceRef" : {
      "clusterName" : "Cluster 1",
      "serviceName" : "HDFS-1",
      "serviceDisplayName" : "HDFS-1",
      "serviceType" : "HDFS"
    },&lt;BR /&gt;...&lt;BR /&gt;   "roleState" : "STARTED",
    "healthSummary" : "GOOD",
    "configStalenessStatus" : "FRESH",
    "haStatus" : "ACTIVE",
    "maintenanceMode" : false,
    "commissionState" : "COMMISSIONED",
    "roleConfigGroupRef" : {
      "roleConfigGroupName" : "HDFS-1-NAMENODE-BASE"
    },
    "entityStatus" : "GOOD_HEALTH"&lt;/PRE&gt;&lt;P&gt;• In both the above examples, check for the keyword&amp;nbsp;"&lt;STRONG&gt;haStatus&lt;/STRONG&gt;". The namenode with haStatus as Active would be your Active Namenode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P class="p1"&gt;&lt;I&gt;Was your question answered? Make sure to mark the answer as the accepted solution.&lt;/I&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;I&gt;If you find a reply useful, say thanks by clicking on the thumbs up button.&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 07:42:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-find-active-namenode-from-cli/m-p/317388#M227147</guid>
      <dc:creator>tjangid</dc:creator>
      <dc:date>2021-05-31T07:42:44Z</dc:date>
    </item>
  </channel>
</rss>

