查看name的状态,是属于active还是standby

时间:2022-12-02 16:42:25

sudo -E -u hadoop /home/hadoop/bin/hdfs haadmin -getServiceState nn1

sudo -E -u hadoop /home/hadoop/bin/hdfs haadmin -getServiceState nn2

sudo -E 加大E是因为在sudo中默认是读不到环境变量的,例如$JAVA_HOME