Tip | |
---|---|
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. |
RHEL/CentOS/Oracle Linux
Run the following commands on all the ZooKeeper nodes:
yum erase zookeeper
yum install zookeeper
Replace your configuration after upgrading. Replace the ZooKeeper template configuration in /etc/zookeeper/conf.
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/zookeeper-env.sh ; /usr/hdp/current/zookeeper-server/bin/zkServer.sh start"
/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start zkfc
SLES
Run the following command on all the ZooKeeper nodes:
zypper rm zookeeper
zypper install zookeeper
Replace your configuration after upgrading. Replace the ZooKeeper template configuration in /etc/zookeeper/conf.
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/zookeeper-env.sh ; /usr/hdp/current/zookeeper-server/bin/zkServer.sh start"
/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start zkfc
Ubuntu/Debian
Run the following command on all the ZooKeeper nodes:
apt-get remove zookeeper --purge
apt-get install zookeeper
Replace your configuration after upgrading. Replace the ZooKeeper template configuration in /etc/zookeeper/conf.
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/zookeeper-env.sh ; /usr/hdp/current/zookeeper-server/bin/zkServer.sh start"
/usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh start zkfc