Shutting Down a Cluster
Lists the considerations to note and the procedure to shutdown a cluster.
Prerequisites
About this task
When you shut down a cluster, follow this sequence to preserve your data and replication:
- Verify that recent data has finished processing.
- Shut down any NFS servers.
- Shut down any ecosystem components that are running.
- Shut down ResourceManager and NodeManager services if you are using YARN
- Shut down Warden on all nodes that are not running CLDB.
- Shut down Warden on the CLDB nodes.
- Shut down ZooKeeper on the ZooKeeper nodes.
Complete the following steps to shut down the cluster:
Procedure
-
Change to the
root
user (or usesudo
for the following commands). -
Before shutting down the cluster, you will need a list of NFS nodes, CLDB nodes,
and all remaining nodes. Once the CLDB is shut down, you cannot retrieve a list of
nodes; it is important to obtain this information at the beginning of the process.
Use the node list command as follows:
-
Determine which nodes are running the NFS gateway. Example:
/opt/mapr/bin/maprcli node list -filter "[rp==/*]and[svc==nfs]" -columns id,h,hn,svc,rp id service hostname health ip 6475182753920016590 fileserver,nodemanager,nfs,hoststats node-252.cluster.us 0 10.10.50.252 8077173244974255917 nodemanager,cldb,fileserver,nfs,hoststats node-253.cluster.us 0 10.10.50.253 5323478955232132984 webserver,cldb,fileserver,nfs,hoststats,resourcemanager node-254.cluster.us 0 10.10.50.254
-
Determine which nodes are running the CLDB. Example:
/opt/mapr/bin/maprcli node list -filter "[rp==/*]and[svc==cldb]" -columns id,h,hn,svc, rp
-
List all non-CLDB nodes. Example:
/opt/mapr/bin/maprcli node list -filter "[rp==/*]and[svc!=cldb]" -columns id,h,hn,svc, rp
-
-
Shut down all NFS instances. Example:
/opt/mapr/bin/maprcli node services -nfs stop -filter [svc=="nfs"]
- If your cluster is running any ecosystem components, shut down those components on all nodes.
-
Shut down all ResourceManager and NodeManager services on all nodes. To shut down
ResourceManager and NodeManager services specify the maprcli
node services command with the
name
parameter and either thefilter
or thenode
parameter . Example:maprcli node services -name resourcemanager -filter <filter> -action stop maprcli node services -name nodemanager -nodes <node> -action stop
-
SSH into each node that is not running CLDB and stop Warden with the command:
service mapr-warden stop
-
SSH into each CLDB node and stop Warden with the command:
service mapr-warden stop
-
SSH into each Zookeeper node and stop Zookeeper with the command:
service mapr-zookeeper stop
-
(Optional) Shut down the nodes using the Linux
halt
command.