All Products
Search
Document Center

E-MapReduce:Manually perform a NameNode checkpoint

Last Updated:Mar 26, 2026

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 hdfs user permissions

Perform the checkpoint

  1. Log on to the cluster over SSH. For more information, see Log on to a cluster.

  2. Switch to the hdfs user.

    su hdfs
  3. Enter safe mode.

    hdfs dfsadmin -safemode enter
    Important

    Checkpoints 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.

  4. Run the checkpoint twice to accelerate the clearance of edit logs. Both commands must complete successfully.

    hdfs dfsadmin -saveNamespace
    hdfs dfsadmin -saveNamespace
  5. Exit safe mode.

    hdfs dfsadmin -safemode leave