List the namenode and datanodes of a cluster from any node?

T. Webster picture T. Webster · Jun 1, 2013 · Viewed 65.9k times · Source

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.

Answer

Tejas Patil picture Tejas Patil · Jun 1, 2013

Use the dfsadmin command:

bin/hadoop dfsadmin -report

Update (2015):

bin/hdfs dfsadmin -report