4. Configure and Start Apache ZooKeeper

[Tip]Tip

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

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

  2. Start ZooKeeper.

    On all 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/zookeeper-env.sh ; 
    /usr/hdp/current/zookeeper-server/bin/zkServer.sh start"
    /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start zkfc

loading table of contents...