Restore a Standby NameNode when its metadata is corrupted or out of sync with the Active NameNode — for example, when a data directory is accidentally deleted, a large number of edit logs are accumulated on a NameNode, or you have manually run a checkpoint on the Active NameNode.
Prerequisites
Before you begin, ensure that you have:
-
A healthy, running Active NameNode
-
SSH access to the node where the Standby NameNode resides
Restore the Standby NameNode
-
In the E-MapReduce (EMR) console, stop the Standby NameNode.
-
Log in to the node where the Standby NameNode resides via SSH. For details, see Log on to a cluster.
-
Switch to the
hdfsuser:su hdfs -
Resync the Standby NameNode from the Active NameNode:
hdfs namenode -bootstrapStandby -
In the EMR console, start the Standby NameNode.
-
Verify that the Standby NameNode is running correctly. Check the NameNode status on the web UI. For details, see Web UIs of HDFS components.