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
时间: 2024-10-10 22:05:32
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