環境說明:
[root@hadp-master sbin]# hadoop version
Hadoop 2.7.4
一、 腳本封裝全部一起啟動、關閉
1.1 啟動
[root@hadp-master sbin]# ./start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [hadp-master]
hadp-master: starting namenode, logging to /usr/local/hadoop/hadoop-2.7.4/logs/hadoop-root-namenode-hadp-master.out
hadp-node2: starting datanode, logging to /usr/local/hadoop/hadoop-2.7.4/logs/hadoop-root-datanode-hadp-node2.out
hadp-node1: starting datanode, logging to /usr/local/hadoop/hadoop-2.7.4/logs/hadoop-root-datanode-hadp-node1.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/hadoop-2.7.4/logs/hadoop-root-secondarynamenode-hadp-master.out
starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop/hadoop-2.7.4/logs/yarn-root-resourcemanager-hadp-master.out
hadp-node2: starting nodemanager, logging to /usr/local/hadoop/hadoop-2.7.4/logs/yarn-root-nodemanager-hadp-node2.out
hadp-node1: starting nodemanager, logging to /usr/local/hadoop/hadoop-2.7.4/logs/yarn-root-nodemanager-hadp-node1.out
說明:啟動所有的Hadoop守護程序。包括NameNode、DataNode、 Secondary NameNode、Yarn、 Yarn-root-nodemanager
1.2 關閉
[root@hadp-master sbin]# ./stop-all.sh
This script is Deprecated. Instead use stop-dfs.sh and stop-yarn.sh
Stopping namenodes on [hadp-master]
hadp-master: stopping namenode
hadp-node2: stopping datanode
hadp-node1: stopping datanode
Stopping secondary namenodes [0.0.0.0]
0.0.0.0: stopping secondarynamenode
stopping yarn daemons
stopping resourcemanager
hadp-node2: no nodemanager to stop
hadp-node1: no nodemanager to stop
no proxyserver to stop
說明:關閉所有的Hadoop守護程序。包括NameNode、DataNode、 Secondary NameNode、Yarn、resourcemanager
二、子產品封裝啟動、關閉
2.1 啟動
[root@hadp-master sbin]# ./start-dfs.sh
說明:啟動Hadoop HDFS守護程序NameNode、DataNode、SecondaryNameNode
[root@hadp-master sbin]# ./start-yarn.sh
說明:啟動yarn daemons、yarn-root-resourcemanager、yarn-root-nodemanager
2.2 關閉
[root@hadp-master sbin]# ./stop-dfs.sh
說明:停止Hadoop HDFS守護程序NameNode、DataNode、SecondaryNameNode
[root@hadp-master sbin]# ./stop-yarn.sh
說明:關閉yarn daemons、yarn-root-resourcemanager、nodemanager
文章可以轉載,必須以連結形式标明出處。
本文轉自 張沖andy 部落格園部落格,原文連結: http://www.cnblogs.com/andy6/p/7441631.html ,如需轉載請自行聯系原作者