BUG-26890: Commands in HA mode behave differently compared to non-HA
Problem: Commands in HA mode behave differently compared to non-HA. For example:
hdfs dfsadmin -safemode enter
- if nn2 is active and nn1 is standby, command will run with no errors, but it will set standby to safemode and not active. If nn1 is actually off, the command will try nn2 and the command in effect will do what it needs to do.The same behavior is true for
hdfs dfsadmin -saveNamespace
.Workaround: You can add the
fs
and specifyhdfs://hostname:8020
of the active namenode, for example:hdfs dfsadmin -fs hdfs://<namenodehostactive>:8020 -saveNamespace
.