<?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 check that all datanode are up by REST API in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-that-all-datanode-are-up-by-REST-API/m-p/238210#M85371</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;BR /&gt;Following API call will tell us how many DataNodes are live.&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X GET  &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/HDFS/components/DATANODE?fields=ServiceComponentInfo/started_count,ServiceComponentInfo/total_count" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/HDFS/components/DATANODE?fields=ServiceComponentInfo/started_count,ServiceComponentInfo/total_count&lt;/A&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;"started_count": &lt;/STRONG&gt;Shows the live (running) DataNodes.&lt;BR /&gt;&lt;STRONG&gt;"total_count" :&lt;/STRONG&gt; Shows how many DataNodes are there in the cluster.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In order to find out the Individual DataNode Status you will need to supply the hostnames where the DataNodes are installed in the following API call.&lt;/P&gt;&lt;PRE&gt;#  curl -H "X-Requested-By: ambari" -u admin:admin -X GET &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx4.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx4.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(OR other host)&lt;BR /&gt;&lt;BR /&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X GET &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx1.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx1.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state&lt;/A&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Dec 2018 09:28:39 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-12-06T09:28:39Z</dc:date>
    <item>
      <title>how to check that all datanode are up by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-that-all-datanode-are-up-by-REST-API/m-p/238209#M85370</link>
      <description>&lt;P&gt;we have ambari cluster ( HDP version 2.6.4 )&lt;/P&gt;&lt;P&gt;how to check that all datanode components  ( HDFS ) are up by REST API ?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 05:41:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-that-all-datanode-are-up-by-REST-API/m-p/238209#M85370</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2018-12-06T05:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to check that all datanode are up by REST API</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-that-all-datanode-are-up-by-REST-API/m-p/238210#M85371</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;BR /&gt;Following API call will tell us how many DataNodes are live.&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X GET  &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/HDFS/components/DATANODE?fields=ServiceComponentInfo/started_count,ServiceComponentInfo/total_count" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/HDFS/components/DATANODE?fields=ServiceComponentInfo/started_count,ServiceComponentInfo/total_count&lt;/A&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;"started_count": &lt;/STRONG&gt;Shows the live (running) DataNodes.&lt;BR /&gt;&lt;STRONG&gt;"total_count" :&lt;/STRONG&gt; Shows how many DataNodes are there in the cluster.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In order to find out the Individual DataNode Status you will need to supply the hostnames where the DataNodes are installed in the following API call.&lt;/P&gt;&lt;PRE&gt;#  curl -H "X-Requested-By: ambari" -u admin:admin -X GET &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx4.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx4.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(OR other host)&lt;BR /&gt;&lt;BR /&gt;# curl -H "X-Requested-By: ambari" -u admin:admin -X GET &lt;A href="http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx1.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state" target="_blank"&gt;http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/newhwx1.example.com/host_components/DATANODE?fields=HostRoles/host_name,HostRoles/state&lt;/A&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2018 09:28:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-check-that-all-datanode-are-up-by-REST-API/m-p/238210#M85371</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-12-06T09:28:39Z</dc:date>
    </item>
  </channel>
</rss>

