Before trying any upgrades or uninstalling software, stop all the hadoop services in the following order::
WebHCat
Tez
HiveServer2
Hive Metastore
ZooKeeper
HBase
YARN
HDFS
Instructions
Stop WebHCat. On the WebHCat host machine, execute the following command:
su -l hcat -c "/usr/lib/hcatalog/sbin/webhcat_server.sh stop"
Stop Tez AM and/or Tez Service.
Execute the following command on the Tez host machine:
$TEZ_HOME/sbin/tez-daemon.sh stop ampoolservice
where,
$TEZ_HOME
is the location of the directory that contains all the Tez JAR files. By default,$TEZ_HOME
is set to/usr/lib/tez
.Stop Hive. Execute these commands on the Hive Metastore and Hive Server2 host machine.
ps aux | awk '{print $1,$2}' | grep hive | awk '{print $2}' | xargs kill >/dev/null 2>&1
Stop ZooKeeper. Execute these commands on the ZooKeeper host machine
su - zookeeper -c "export ZOOCFGDIR=/etc/zookeeper/conf ; export ZOOCFG=zoo.cfg ;source /etc/zookeeper/conf/zookeeper-env.sh ; /usr/lib/zookeeper/bin/zkServer.sh stop"
Stop HBase
Execute these commands on all RegionServers:
su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop regionserver"
Execute these commands on the HBase Master host machine:
su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop master"
Stop YARN
Execute these commands on all NodeManagers:
su -l yarn -c "/usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR stop nodemanager"
Execute these commands on the JobTracker History Server host machine:
su -l mapred -c "/usr/lib/hadoop-mapreduce/sbin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver"
Execute theses commands on the ResourceManager host machine:
su -l yarn
/usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR stop resourcemanager
Stop HDFS
Execute these commands on all DataNodes:
su -l hdfs -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop datanode"
Execute these commands on the Secondary NameNode host machine:
su -l hdfs -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop secondarynamenode”
Execute these commands on the NameNode host machine:
su -l hdfs -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop namenode"