hadoop - Find port number where HDFS is listening -



hadoop - Find port number where HDFS is listening -

i want access hdfs qualified names such :

hadoop fs -ls hdfs://machine-name:8020/user

i access hdfs with

hadoop fs -ls /user

however, writing test cases should work on different distributions(hdp, cloudera, mapr...etc) involves accessing hdfs files qualified names.

i understand hdfs://machine-name:8020 defined in core-site.xml fs.default.name. seems different on different distributions. example, hdfs maprfs on mapr. ibm biginsights don't have core-site.xml in $hadoop_home/conf.

there doesn't seem way hadoop tells me what's defined in fs.default.name it's command line options.

how can value defined in fs.default.name reliably command line?

the test running on namenode, machine name easy. getting port number(8020) bit difficult. tried lsof, netstat.. still couldn't find reliable way.

following command available in apache hadoop 2.0 can used getting values hadoop configuration properties. fs.default.name deprecated in hadoop 2.0, fs.defaultfs updated value. not sure whether work incase of maprfs.

hdfs getconf -confkey fs.default.name

not sure whether there command line utilities available retrieving configuration properties values in mapr or hadoop 0.20 hadoop versions. in case of situation improve seek same in java retrieving value corresponding configuration property.

configuration hadoop conf = configuration.getconf(); system.out.println(conf.get("fs.default.name"));

hadoop hdfs cloudera hortonworks-data-platform mapr

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -