Before trying any upgrades or uninstalling software, stop all Hadoop services in the following order:
Nagios
Ganglia
Oozie
WebHCat
Hive Metastore
ZooKeeper
HBase
MapReduce
HDFS
Stop Nagios. On the Nagios host machine, execute the following command:
service nagios stop
Stop Ganglia.
Execute this command on the Ganglia server host machine:
/etc/init.d/hdp-gmetad stop
Execute this command on all the nodes in your Hadoop cluster:
/etc/init.d/hdp-gmond stop
Stop Oozie. On the Oozie server host machine, execute the following command:
sudo su -l oozie -c "cd $OOZIE_LOG_DIR/log; /usr/lib/oozie/bin/oozie-stop.sh"
where:
$OOZIE_USER
is the Oozie Service user. For example,oozie
$OOZIE_LOG_DIR
is the directory where Oozie log files are stored (for example:/var/log/oozie
).
Stop WebHCat. On the WebHCat host machine, execute the following command:
su -l $WEBHCAT_USER -c "/usr/lib/hcatalog/sbin/webhcat_server.sh stop"
where:
$WEBHCAT_USER
is the WebHCat Service user. For example,hcat
.
Stop Hive. On the Hive Metastore host machine and Hive Server2 host machine, execute the following command:
ps aux | awk '{print $1,$2}' | grep hive | awk '{print $2}' | xargs kill >/dev/null 2>&1
This will stop Hive Metastore and HCatalog services.
Stop ZooKeeper. On the ZooKeeper host machine, execute the following command:
su - $ZOOKEEPER_USER -c "export ZOOCFGDIR=/etc/zookeeper/conf ; export ZOOCFG=zoo.cfg ;source /etc/zookeeper/conf/zookeeper-env.sh ; /usr/lib/zookeeper/bin/zkServer.sh stop"
where
$ZOOKEEPER_USER
is the ZooKeeper Service user. For example,zookeeper
.Stop HBase.
Execute these commands on all RegionServers:
su -l $HBASE_USER -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_USER -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop master"
where
$HBASE_USER
is the HBase Service user. For example,hbase
.Stop MapReduce
Execute these commands on all TaskTrackers:
su -l $MAPRED_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker"
Execute these commands on the JobTracker host machine:
su -l $MAPRED_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop historyserver"
Execute theses commands on the JobTracker host machine:
su -l $MAPRED_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop jobtracker"
where
$MAPRED_USER
is the MapReduce Service user. For example,mapred
.Stop HDFS
Execute these commands on all DataNodes:
su -l $HDFS_USER -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_USER -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_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop namenode"
where
$HDFS_USER
is the HDFS Service user. For example,hdfs
.