1, the configuration mapred-site.xml
[root@node01 hadoop]# mv mapred-site.xml.template mapred-site.xml [root@node01 hadoop]# vi mapred-site.xml <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property>
2, the configuration yarn-site.xml
[root@node01 hadoop]# vi yarn-site.xml <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property>
<property> <name>yarn.resourcemanager.ha.enabled</name> <value>true</value> </property>
<property> <name>yarn.resourcemanager.cluster-id</name> <value>cluster1</value> </property> <property> <name>yarn.resourcemanager.ha.rm-ids</name> <value>rm1,rm2</value> </property> <property> <name>yarn.resourcemanager.hostname.rm1</name> <value>node03</value> </property> <property> <name>yarn.resourcemanager.hostname.rm2</name> <value>node04</value> </property> <property> <name>yarn.resourcemanager.zk-address</name> <value>node02:2181,node03:2181,node04:2181</value> </property>
3, these two documents will be distributed to the other node Hadoop
[root@node01 hadoop]# scp mapred-site.xml yarn-site.xml node02:`pwd`
4, so avoid each other between two key ResourceManager
[@ node03 the root. SSH ] # SSH-keygen -t DSA -P '' -f ./ id_dsa [@ node03 the root. SSH ] # CAT id_dsa.pub >> the authorized_keys [@ node03 the root. SSH ] # SCP id_dsa.pub node04: ` pwd ` / node03.pub [. @ node04 the root SSH ] # CAT node03.pub >> the authorized_keys
to another node in the same procedure
5, start
Boot sequence:
①zookeeper, zkServer.sh Start
②hdfs (Note that there is a script not to use, start-all) start-dfs.sh
If nn and nn2 does not start, you need node01, node02 were manually start:
hadoop-daemon.sh Start the NameNode
③start- yarn.sh (start nodemanager)
④ execute the script node, respectively, in 03, 04: yarn-daemon.sh start resourcemanager
6, after starting the process of each node role
[root @ node01 ~ ] # JPS 3136 JPS 2612 NameNode 2955 DFSZKFailoverController 2798 JournalNode [root @ node02 ~ ] # JPS 2306 DFSZKFailoverController 2388 NodeManager 2056 NameNode 2120 DataNode 2202 JournalNode 2524 JPS 1388 QuorumPeerMain [root @ node03 ~ ] # JPS 1875 DataNode 1957 JournalNode 1414 QuorumPeerMain 2409 JPS 2185 ResourceManager 2044 NodeManager [root@node04 ~]# jps 1890 NodeManager 1794 DataNode 2085 Jps 1415 QuorumPeerMain 2031 ResourceManager
7, http access ports: 8088
8, stop:
node01: stop-dfs.sh
node01: stop-yarn.sh (stop nodemanager)
node03, node04: yarn-daemon.sh the ResourceManager STOP (Stop the ResourceManager )
ZooKeeper:zkServer.sh stop