Scaling Namespaces and Optimizing Data Storage
Also available as:
PDF
loading table of contents...

Format NameNodes

To add a NameNode HA to a federation, you must format each new active NameNode that you want to add to the federation. In addition, you must bootstrap the standby NameNode.

You must have configured the parameters for the NameNodes.
Note
Note
Ensure that you format only those NameNodes that are associated with newly created namespaces for the federation. Formatting any NameNode with already existing namespaces could result in data loss.
  1. Format the active NameNode by specifying the Cluster ID.

    The Cluster ID must be the same as that of the existing namespaces.

    hdfs namenode -format [-clusterId <cluster_id>]
    

  2. Bootstrap the standby NameNode as specified.
    hdfs namenode -bootstrapStandby