You need to manually restore a Standby NameNode in scenarios such as the following ones: A data directory of a NameNode is accidentally deleted, a large number of edit logs are accumulated on a NameNode, or checkpoints have been manually performed for the healthy Active NameNode. This topic describes how to manually restore a Standby NameNode.
- Stop the Standby NameNode that you want to restore in the E-MapReduce (EMR) console.
- Log on to the node on which the Standby NameNode that you want to restore resides by using SSH. For more information, see Log on to a cluster.
- Run the following command to switch to the hdfs user:
- Run the following command to restore the Standby NameNode to its initial configurations:
hdfs namenode -bootstrapStandby # Enter Y if the information is correct.
- Start the Standby NameNode in the EMR console and view its status by accessing the web UI. For more information about how to view the NameNode status on the web UI, see Web UIs of HDFS components.