Recommended procedure for restarting the cluster:

  1. enter safe mode
  2. save namespace
  3. shutdown the cluster
  4. start the cluster

The patch introduces a new DFSAdmin command which is called using

$ hdfs 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

$ hdfs dfsadmin -safemode enter