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.
dfs.namenode.name.dir and
        dfs.journalnode.edits.dir from the configuration of HDFS service in the
      Cloudera Manager Admin Console.Cloudera recommends you to take a backup for the above directories so that if there is any operator error, you still have a chance to recover.
In this example, the following values are assumed: 
- The current nameservice name is 
nameservice1. - The NameNode data directory is 
/data/dfs/nn. - The JournalNode edits directory is 
/data/dfs/jn. 
- 
        Ensure that both NameNodes enter safemode and you save the current namespace and merge
          all the recent edits to the same fsimage id for both NameNodes.
        
- Go to .
 - Click .
 - Click .
 - Click .
 - Click .
 - ssh to both NameNodes data directories to ensure that the same fsimage is generated.
 
 - 
        Delete the current nameservice znode from ZooKeeper CLI.
        
 - 
        In the Cloudera Manager Admin Console, change the NameNode nameservice name.
        
 - 
        Create a new nameservice znode.
        
 - 
        Update Hive Metastore NameNodes.
        
- Go to the Hive service.
 - Select .
 
 - If you have an Impala service, restart the Impala service or run an INVALIDATE METADATA query.
 - 
        Initialize JournalNode shared edits directory.
        
- Click Instances.
 - Select the checkboxes next to the JournalNode role instances.
 - Select .
 - Click any NameNode, select .
 - ssh to JournalNode host to ensure that the JournalNode data directory has the new nameservice folder generated.
 
 - 
        Start other HDFS roles.
        
 - Redeploy client configuration files.
 - Start all services except ZooKeeper.
 - 
        For clusters having Ranger service, change the references to new nameservice name, if
          any.
        
- Go to Ranger Admin Web UI, click cm_hdfs, check available policies and change the references to new nameservice name on HDFS path, if any.
 - On Ranger Admin Web UI, click cm_hive, check available policies and change the references to new nameservice name on Impala URI, if any.
 
 
