Command Line Upgrade
Also available as:
loading table of contents...

Configure and Start Apache ZooKeeper


If you are running a highly available cluster, upgrade Apache ZooKeeper before you upgrade HDFS. This best practice lets the upgraded ZKFC work with your primary NameNode and your Standby NameNode.


The su commands in this section use keywords to represent the Service user. For example, "zookeeper" is used to represent the ZooKeeper Service user. If you are using another name for your Service users, you need to substitute your Service user name in each of the su commands.

  1. Replace your configuration after upgrading. Replace the ZooKeeper template configuration in /etc/zookeeper/conf.

  2. Start ZooKeeper.

    On all the ZooKeeper server host machines, run the following command to start ZooKeeper and the ZKFC:

    su - zookeeper -c "export ZOOCFGDIR=/usr/hdp/current/zookeeper-server/conf ; export ZOOCFG=zoo.cfg; source /usr/hdp/current/zookeeper-server/conf/ ; /usr/hdp/current/zookeeper-server/bin/ start"

    /usr/hdp/current/hadoop-client/sbin/ start zkfc