Rest Api for getting dfs used for individual nodes

2019-09-14 17:52发布

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

标签: rest hadoop hdfs
1条回答
Emotional °昔
2楼-- · 2019-09-14 18:30

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
查看更多
登录 后发表回答