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

Downgrade HDFS DataNodes

  1. Shut down the current DataNode:

    su – hdfs -c "hdfs dfsadmin -shutdownDatanode <DATANODE_HOST:IPC_PORT> upgrade"

    For example:

    [hdp@node-1 ~]# su - hdfs -c 'hdfs dfsadmin -shutdownDatanode node-1.example.com:8010 upgrade'
    Submitted a shutdown request to datanode node-1.example.com:8010
  2. Check to make sure the DataNode has stopped:

    su – hdfs -c "hdfs dfsadmin -getDatanodeInfo <DATANODE_HOST:IPC_PORT>"

    If the DataNode stopped successfully you’ll see a series of retry messages, followed by Datanode unreachable.

  3. Switch to the previous DataNode version, and then start the DataNode:

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

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

  4. To verify that the DataNode joined the HDFS cluster, list live HDFS processes:

    su - hdfs -c "hdfs dfsadmin -report -live"

    This should list the downgraded DataNode as a live node.

    Type Control-C to exit the utility.