Disabling and Redeploying HDFS HA
Disabling and Redeploying HDFS HA Using Cloudera Manager
Minimum Required Role: Cluster Administrator (also provided by Full Administrator)
- Go to the HDFS service.
- Select .
- Select the hosts for the NameNode and the SecondaryNameNode and click Continue.
- Select the HDFS checkpoint directory and click Continue.
- Confirm that you want to take this action.
- Update the Hive Metastore NameNode.
Cloudera Manager ensures that one NameNode is active, and saves the namespace. Then it stops the standby NameNode, creates a SecondaryNameNode, removes the standby NameNode role, and restarts all the HDFS services.
Disabling and Redeploying HDFS HA Using the Command Line
If you need to unconfigure HA and revert to using a single NameNode, either permanently or for upgrade or testing purposes, proceed as follows.
Step 1: Shut Down the Cluster
- Shut down Hadoop services across your entire cluster. Do this from Cloudera Manager; or, if you are not using Cloudera Manager, run the following command on every host in your cluster:
$ for x in `cd /etc/init.d ; ls hadoop-*` ; do sudo service $x stop ; done
- Check each host to make sure that there are no processes running as the hdfs, yarn, mapred
or httpfs users from root:
# ps -aef | grep java
Step 2: Unconfigure HA
- Disable the software configuration.
- If you are using Quorum-based storage and want to unconfigure it, unconfigure the HA properties described under Enabling HDFS HA Using the Command Line.
If you intend to redeploy HDFS HA later, comment out the HA properties rather than deleting them.
- If you are using Quorum-based storage and want to unconfigure it, unconfigure the HA properties described under Enabling HDFS HA Using the Command Line.
- Move the NameNode metadata directories on the standby NameNode. The location of these directories is configured by dfs.namenode.name.dir and dfs.namenode.edits.dir. Move them to a backup location.
Redeploying HDFS High Availability
If you need to redeploy HA using Quorum-based storage after temporarily disabling it, proceed as follows:
- Shut down the cluster as described in Step 1: Shut Down the Cluster.
- Uncomment the properties you commented out in Step 2: Unconfigure HA.
- Deploy HDFS HA, following the instructions under Deploying HDFS High Availability.