获取Namenode ID
查看nn1的状态
hdfs haadmin -getServiceState namenode30 #standby hdfs haadmin -getServiceState namenode37 #active
修改nn2为standby状态
hdfs haadmin -transitionToStandby --forcemanual namenode37
修改nn1为active状态
hdfs haadmin -transitionToActive --forcemanual namenode30
标签:hdfs,--,haadmin,CDH,getServiceState,主备,active,NameNode,forcemanual From: https://www.cnblogs.com/gentlescholar/p/16648748.html