A checkpoint saves the current namespace of a NameNode and prevents you from taking an extended period of time to restart the NameNode.
Prerequisites
Before you begin, ensure that you have:
-
SSH access to the EMR cluster
-
The
hdfsuser permissions
Perform the checkpoint
-
Log on to the cluster over SSH. For more information, see Log on to a cluster.
-
Switch to the
hdfsuser.su hdfs -
Enter safe mode.
hdfs dfsadmin -safemode enterImportantCheckpoints on a NameNode must be performed in safe mode. If the checkpoint fails while in safe mode, DfsClient automatically retries. We recommend that you perform this operation during off-peak hours.
-
Run the checkpoint twice to accelerate the clearance of edit logs. Both commands must complete successfully.
hdfs dfsadmin -saveNamespace hdfs dfsadmin -saveNamespace -
Exit safe mode.
hdfs dfsadmin -safemode leave