Any command to get active namenode for nameservice in hadoop?

后端 未结 10 1439
情歌与酒
情歌与酒 2020-12-13 22:08

The command:

hdfs haadmin -getServiceState machine-98

Works only if you know the machine name. Is there any command like:

h         


        
10条回答
  •  遥遥无期
    2020-12-13 22:34

    You can do a curl command to find out the Active and secondary Namenode for example

    curl -u username -H "X-Requested-By: ambari" -X GET http://cluster-hostname:8080/api/v1/clusters//services/HDFS

    Regards

提交回复
热议问题