saveNamespace will save the namespace image directly to disk(s), it does not need to replay the journal.
Since saving the image is much faster than digesting the edits the command can substantially reduce the overall cluster restart time.
Recommended procedure for restarting the cluster:
- enter safe mode
- save namespace
- shutdown the cluster
- start the cluster
The patch introduces a new DFSAdmin command which is called using
hadoop dfsadmin -saveNamespace
As all other DFSAdmin commands it requires superuser permissions.
In addition, the name-node must be in safe mode, because we don't want to allow changing namespace during the save.
In order to enter safe mode call
hadoop dfsadmin -safemode enter
The patch also corrects 2 warnings in TestCheckpoint, and 2 Javadoc warnings in FSNamesystem.