Rest Api for getting dfs used for individual nodes

2019-09-14 17:41发布

问题:

Is there any rest API or Hadoop metrics for getting dfs used for individual nodes. Currently, I'm getting dfs used for individual nodes by executing the below command manually

hdfs dfsadmin -report

回答1:

It's not a REST API but you should be able to use the NameNode's JMX interface to pull this info.

http://NAMENODE:DFSPORT/jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo

This contains the same information as:

hdfs dfsadmin -report

which is also published on:

http://NAMENODE:DFSPORT/dfshealth.html#tab-datanode


标签: rest hadoop hdfs