2. Stopping HDP Services

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

  1. Stop Nagios. On the Nagios host machine, execute the following command:

    service nagios stop 

  2. Stop Ganglia.

    1. Execute this command on the Ganglia server host machine:

      /etc/init.d/hdp-gmetad stop
    2. Execute this command on all the nodes in your Hadoop cluster:

      /etc/init.d/hdp-gmond stop
  3. 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).

  4. 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.

  5. 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.

  6. 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.

  7. Stop HBase.

    1. Execute these commands on all RegionServers:

      su -l $HBASE_USER -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf stop regionserver"
    2. 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.

  8. Stop MapReduce

    1. Execute these commands on all TaskTrackers:

      su -l $MAPRED_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop tasktracker"
    2. 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"
    3. 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.

  9. Stop HDFS

    1. Execute these commands on all DataNodes:

      su -l $HDFS_USER -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf stop datanode"
    2. 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” 
    3. 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.


loading table of contents...