<?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: DataNode has specific JMX port number 50070,how do I get it dynamically,Like I want to hit a particular Jmx port,but I don't want to hard code port number,I want to know where it is stored in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242268#M204071</link>
    <description>&lt;P&gt;@Jay Kumar SenSharma  thank you,it worked&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 11:12:08 GMT</pubDate>
    <dc:creator>vinith_alampall</dc:creator>
    <dc:date>2019-06-12T11:12:08Z</dc:date>
    <item>
      <title>DataNode has specific JMX port number 50070,how do I get it dynamically,Like I want to hit a particular Jmx port,but I don't want to hard code port number,I want to know where it is stored</title>
      <link>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242266#M204069</link>
      <description />
      <pubDate>Tue, 11 Jun 2019 13:25:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242266#M204069</guid>
      <dc:creator>vinith_alampall</dc:creator>
      <dc:date>2019-06-11T13:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: DataNode has specific JMX port number 50070,how do I get it dynamically,Like I want to hit a particular Jmx port,but I don't want to hard code port number,I want to know where it is stored</title>
      <link>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242267#M204070</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/114687/vinithalampally.html"&gt;@Alampally Vinith&lt;/A&gt;&lt;/P&gt;&lt;P&gt;May be you can invoke the Ambari API call to find the current HDFS Configs and then grep the configs that you want.&lt;/P&gt;&lt;P&gt;Example Finding DataNode Http Port.&lt;/P&gt;&lt;PRE&gt;# curl -s -u admin:admin -H "X-Requested-By:ambari" -X GET "http://$AMBARI_HOSTNAME:8080/api/v1/clusters/$CLUSTER_NAME/configurations/service_config_versions?service_name=HDFS%26is_current=true" | grep "dfs.datanode.http.address" | awk -F"\"" '{print $4}'&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example Finding NameNode Http Port.&lt;/P&gt;&lt;PRE&gt;# curl -s -u admin:admin -H "X-Requested-By:ambari" -X GET "http://$AMBARI_HOSTNAME:8080/api/v1/clusters/$CLUSTER_NAME/configurations/service_config_versions?service_name=HDFS%26is_current=true" | grep "dfs.namenode.http-address" | awk -F"\"" '{print $4}'&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Also if you have the filesystem access then you can get the configs properties values from the following file:&lt;/P&gt;&lt;PRE&gt;# grep -A1 'dfs.namenode.http-address' /etc/hadoop/conf/hdfs-site.xml&amp;nbsp;
# grep -A1 'dfs.datanode.http.address' /etc/hadoop/conf/hdfs-site.xml &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Another option will be to get the output of the following commands:&lt;/P&gt;&lt;PRE&gt;# hdfs getconf -confKey "dfs.datanode.http.address"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 13:35:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242267#M204070</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-06-11T13:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: DataNode has specific JMX port number 50070,how do I get it dynamically,Like I want to hit a particular Jmx port,but I don't want to hard code port number,I want to know where it is stored</title>
      <link>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242268#M204071</link>
      <description>&lt;P&gt;@Jay Kumar SenSharma  thank you,it worked&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 11:12:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/DataNode-has-specific-JMX-port-number-50070-how-do-I-get-it/m-p/242268#M204071</guid>
      <dc:creator>vinith_alampall</dc:creator>
      <dc:date>2019-06-12T11:12:08Z</dc:date>
    </item>
  </channel>
</rss>

