启动和关闭Hadoop集群命令步骤
启动和关闭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界面观察集群运行情况.(如果遇到问题 看 https://www.cnblogs.com/zlslch/p/6604189.html )
6. 用hadoop-daemon.sh stop ...手工关闭集群.
- 关闭NodeManager 、ResourceManager和HistoryManager
[ hadoop-2.7.2]$ sbin/yarn-daemon.sh stop resourcemanager
[ hadoop-2.7.2]$ sbin/yarn-daemon.sh stop nodemanager
[ hadoop-2.7.2]$ sbin/mr-jobhistory-daemon.sh stop historyserver
- 启动NodeManager 、ResourceManager和HistoryManager
[ hadoop-2.7.2]$ sbin/yarn-daemon.sh start resourcemanager
[ hadoop-2.7.2]$ sbin/yarn-daemon.sh start nodemanager
[ hadoop-2.7.2]$ sbin/mr-jobhistory-daemon.sh start historyserver
- 删除HDFS上已经存在的输出文件
[ hadoop-2.7.2]$ bin/hdfs dfs -rm -R /user/atguigu/output