Changing a nameservice name for Highly Available HDFS using Cloudera Manager

Based on your requirements, you can change a nameservice name for a cluster that has HDFS HA configured.

Before you start, make note of the name of the active NameNode role instance. You can find the list of NameNode instances on the Instances tab for the HDFS service in the Cloudera Manager Admin Console.
  1. Ensure that you save the current namespace and merge all the recent edits to the fsimage.
    1. Go to the HDFS service.
    2. Click the Instances tab.
    3. Click on an active NameNode role instance.
    4. Select Actions > Enter Safemode.
      A confirmation message displays asking you to cancel or enter safemode.
    5. Click Enter Safemode.
    6. Select Actions > Save Namespace.
      A confirmation message displays asking you to cancel or save the namespace.
    7. Click Save Namespace.
  2. Stop all services except ZooKeeper.
  3. On a ZooKeeper host, run zookeeper-client.
    1. Execute the following to remove the configured nameservice.
      This example assumes the name of the nameservice is nameservice1. You can identify the nameservice from the Federation and High Availability section on the HDFS Instances tab.
      rmr /hadoop-ha/nameservice1
  4. In the Cloudera Manager Admin Console, update the NameNode nameservice name.
    1. Go to the HDFS service.
    2. Click the Configuration tab.
    3. Type nameservice in the Search field.
    4. For the NameNode Nameservice property, type the nameservice name in the NameNode (instance_name) field.
      The name must be unique and can contain only alphanumeric characters.
    5. Type quorum in the Search field.
    6. For the Quorum-based Storage Journal name property, type the nameservice name in the NameNode (instance_name) field.
  5. Click the Instances tab.
  6. In the Federation and High Availability pane, select Actions > Initialize High Availability State in ZooKeeper.
  7. Go to the Hive service.
  8. Select Actions > Update Hive Metastore NameNodes.
  9. Go to the HDFS service.
  10. Click the Instances tab.
  11. Select the checkboxes next to the JournalNode role instances.
  12. Select Actions for Selected > Start.
  13. Click on an active NameNode role instance.
  14. Select Actions > Initialize Shared Edits Directory.
  15. Click the Cloudera Manager logo to return to the Home page.
  16. Redeploy client configuration files.
  17. Start all services except ZooKeeper.