Adding multiple namenodes using the HDFS service

You must ensure that Cloudera Manager is in a clean state without any health issues and no stale configurations on the cluster. If there are any health issues or stale configurations, then you must restart the cluster separately from the command and not within the command. For this, you must clear the Rolling Restart HDFS and all dependent services to activate the changes option in step 10b. Also, if there are any health issues or stale configurations that cannot be cleared from the cluster, you must restart the cluster separately.

You can add multiple namenodes using the HDFS service in Cloudera Manager.

  1. Log in to Cloudera Manager UI
  2. Navigate to Clusters
  3. Select the HDFS service
  4. Go to Instances
  5. Click Federation and High Availability
  6. Click Actions
  7. Click Add Additional NameNode(s). Add Additional NameNode wizard opens.
  8. In the Assign Roles page, select a host which is not assigned to any namenode.
  9. Click Continue.
  10. In the Review Changes page, you can specify the namenode data directory.
    1. If you want to delete the data present in the namenode data directory you have provided, then you must select the Clear any existing data present in name directories of Standby NameNode option. Remember to take a backup of the namenode data directory.
    2. If you want to restart HDFS service and its dependencies, then you must select the Rolling Restart HDFS and all dependent services to activate the changes option. Remember that if you have not enabled High Availability feature, the rolling restart may cause a cluster downtime. Note: If you do not select the Rolling Restart option, then you can click Continue and restart the cluster later.
  11. Click Continue. This runs the required commands and adds the additional namenodes.
  12. Click Finish.