<>架构
hadoop-1 hadoop-2 NameNode
hadoop1-5 zookeeper 同步2个NameNode之间的数据
hadoop2-28 DataNode
<>Hadoop集群的启动
zookeeper: /home/pubsrv/zookeeper-3.4.3-cdh4.0.0/bin/zkServer.sh start
//1,2,3,4,5 jobhistoryserver:(自带的一个历史服务器,可以通过历史服务器查看已经运行完的Mapreduce作业记录)
/home/pubsrv/hadoop-cdh5/lib/hadoop-mapreduce/sbin/mr-jobhistory-daemon.sh
start historyserver //1 resourcemanager: 先jps,并kill掉resourcemanager
/home/pubsrv/hadoop-cdh5/lib/hadoop-yarn/sbin/yarn-daemon.sh start
resourcemanager //1,2 stop(停止) namenode:
/home/pubsrv/hadoop-cdh5/lib/hadoop/sbin/hadoop-daemon.sh start namenode //1,2
zkfc:(保证NameNode的高可用,当一个NameNode有异常时,断开与zookeeper的连接)
/home/pubsrv/hadoop-cdh5/lib/hadoop/sbin/hadoop-daemon.sh start zkfc //1,2
journalnode:(2个NameNode共享数据)
/home/pubsrv/hadoop-cdh5/lib/hadoop/sbin/hadoop-daemon.sh start journalnode
//1,2,3,4,5 nodemanger:
/home/pubsrv/hadoop-cdh5/lib/hadoop-yarn/sbin/yarn-daemon.sh start nodemanager
//2-28 datanode: /home/pubsrv/hadoop-cdh5/lib/hadoop/sbin/hadoop-daemon.sh
start datanode //2-28![在这里插入图片描述](
https://img-blog.csdnimg.cn/20181217120351290.png)
<>参考博客
Hadoop集群的JobHistoryServer详解
[1]https://blog.csdn.net/play_chess_ITmanito/article/details/51965279
<https://blog.csdn.net/play_chess_ITmanito/article/details/51965279>
NameNode的ZKFC机制
[2]https://www.cnblogs.com/lixiaolun/p/6897706.html
<https://www.cnblogs.com/lixiaolun/p/6897706.html>
Hadoop Journal Node 作用
[3]https://my.oschina.net/u/189445/blog/661561
<https://my.oschina.net/u/189445/blog/661561>
热门工具 换一换