37

From any node in a Hadoop cluster, what is the command to

  • identify the running namenode?
  • identify all running datanodes?

I have looked through the commands manual and have not found this.

4

4 回答 4

53

使用dfsadmin 命令

bin/hadoop dfsadmin -report

更新(2015 年):

bin/hdfs dfsadmin -report

于 2013-06-01T03:40:01.430 回答
31

尝试这个:

hdfs getconf -namenodes
hdfs getconf -secondaryNamenodes
于 2016-03-22T14:19:54.353 回答
25

尝试这个。对于 dfsadmin,并非每个用户都有权限。

hdfs getconf -confKey fs.defaultFS
hdfs://XYZ
于 2016-10-19T17:08:51.407 回答
4

2016 年更新,遵循 Tejas 的回答:

hadoopuser@gsamaras:~/hadoop/bin$ ./hdfs dfsadmin -report
于 2016-01-24T14:07:52.740 回答