Rolling Upgrade Guide
Also available as:
PDF
loading table of contents...

Downgrade the HDFS NameNode HA Process Pair

During the downgrade process, you will start the NameNode process with the regular start command (without the -rollingUpgrade option used during the upgrade process).

In the following steps, "NN1" refers to your active NameNode process, and "NN2" refers to your current standby NameNode process. (The NameNode Web UI is at http://namenode-name:50070/.)

Switch the current standby process, NN2, to the previous software version:

  1. Shut down NN2 and the corresponding ZKFC process, switch NN2 to the previous version, and start NN2.

    su - hdfs –c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop namenode"

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop zkfc"

    hdp-select set hadoop-hdfs-namenode 2.2.0.0-2041

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode"

  2. Verify that NN2 is running successfully and in standby mode. Use the hdfs haadmin CLI to check state. If the service-ID of NN2 is nn2, then the following command should return "standby":

    > hdfs haadmin -getServiceState nn2

  3. Start ZKFC:

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start zkfc"

  4. Wait until NN2 is out of safe mode before proceeding. To review status, see the Web GUI at http://${HOST}:50070.

Next, failover from NN1 to NN2, and downgrade NN1:

  1. Force a failover from NN1 (currently active) to NN2, so that NN1 becomes the standby process:

    >hdfs haadmin -failover --forceactive <from-serviceid> <to-serviceid>

  2. Shut down NN1 and the corresponding ZKFC process, switch to the previous version, and start NN1:

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop namenode"

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop zkfc"

    hdp-select set hadoop-hdfs-namenode 2.2.0.0-2041

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode;

  3. Verify that NN1 is running successfully and in standby mode. Use the hdfs haadmin CLI to check state. If the service-ID of NN1 is configured as nn1, then the following command should return "standby":

    > hdfs haadmin -getServiceState nn1

  4. Start ZKFC:

    su - hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start zkfc"

Continue with the next downgrade step.