This is the documentation for CDH 5.1.x. Documentation for other versions is available at Cloudera Documentation.

Stopping Services

Run the following command on every host in the cluster to shut down all Hadoop Common system services that are started by init in the cluster:

$ for x in `cd /etc/init.d ; ls hadoop-*` ; do sudo service $x stop ; done

To verify that no Hadoop processes are running, issue the following command on each host::

# ps -aef | grep java

You could also use ps -fu hdfs and ps -fu mapred to confirm that no processes are running as the hdfs or mapred user, but additional user names are created by the other components in the ecosystem; checking for the "java" string in the ps output is an easy way to identify any processes that may still be running.

To stop system services individually, use the instructions in the table below.

STOP system services in this order:

Order

Service

Comments

Instructions

1

Hue

 

Run the following on the Hue Server machine to stop Hue sudo service hue stop

2

Sqoop 1

 

Run the following on all nodes where it is running: sudo service sqoop-metastore stop

2

Sqoop 2

 

Run the following on all nodes where it is running: $ sudo /sbin/service sqoop2-server stop

3

Flume 0.9

 

Stop the Flume Node processes on each node where they are running:

sudo service flume-node stop Stop the Flume Master sudo service flume-master stop

4

Flume 1.x

There is no Flume master

Stop the Flume Node processes on each node where they are running:

sudo service flume-ng-agent stop

5

Oozie

 

sudo service oozie stop

6

Hive

 

To stop Hive, exit the Hive console and make sure no Hive scripts are running.

Shut down HiveServer2: sudo service hiveserver2 stop

Shut down the Hive metastore daemon on each client: sudo service hive-metastore stop

If the metastore is running from the command line, use Ctrl-c to shut it down.

7

HBase

Stop the Thrift server and clients, then shut down the cluster.

To stop the Thrift server and clients: sudo service hbase-thrift stop

To shut down the cluster, use this command on the master node: sudo service hbase-master stop

Use the following command on each node hosting a region server: sudo service hadoop-hbase-regionserver stop

8a

MapReduce v1

Stop Hive and Oozie before stopping MapReduce.

To stop MapReduce, stop the JobTracker service, and stop the Task Tracker on all nodes where it is running. Use the following commands:

sudo service hadoop-0.20-mapreduce-jobtracker stop

sudo service hadoop-0.20-mapreduce-tasktracker stop

8b

YARN

Stop Hive and Oozie before stopping YARN.

To stop YARN, stop the MapReduce JobHistory service, ResourceManager service, and NodeManager on all nodes where they are running. Use the following commands:

sudo service hadoop-mapreduce-historyserver stop

sudo service hadoop-yarn-resourcemanager stop

sudo service hadoop-yarn-nodemanager stop

9

HttpFS

 

sudo service hadoop-httpfs stop

10

HDFS

 

To stop HDFS: On the NameNode: sudo service hadoop-hdfs-namenode stop

On the Secondary NameNode (if used): sudo service hadoop-hdfs-secondarynamenode stop

On each DataNode: sudo service hadoop-hdfs-datanode stop

11

ZooKeeper

Stop HBase and HDFS before stopping ZooKeeper.

To stop the ZooKeeper server, use one of the following commands on each ZooKeeper node:

sudo service zookeeper-server stop

or

sudo service zookeeper stop

Page generated September 3, 2015.