启动和关闭Hadoop集群命令步骤总结:
1. 在master上启动hadoop-daemon.sh start namenode.
2. 在slave上启动hadoop-daemon.sh start datanode.
3. 用jps指令观察执行结果.
4. 用hdfs dfsadmin -report观察集群配置情况.
5. 通过http://npfdev1:50070界面观察集群运行情况
6. 用hadoop-daemon.sh stop ...手工关闭集群.
1. 关闭NodeManager 、ResourceManager和HistoryManager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh stop resourcemanager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh stop nodemanager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/mr-jobhistory-daemon.sh stop historyserver
1. 启动NodeManager 、ResourceManager和HistoryManager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh start resourcemanager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/yarn-daemon.sh start nodemanager
[atguigu@hadoop101 hadoop-2.7.2]$ sbin/mr-jobhistory-daemon.sh start historyserver
1. 删除HDFS上已经存在的输出文件
[atguigu@hadoop101 hadoop-2.7.2]$ bin/hdfs dfs -rm -R /user/atguigu/output