整体步骤:
node01为管理节点,所以配置信息在node01写,然后分发
cpmapred-site.xml.templatemapred-site.xml
vimapred-site.xml,写入
mapreduce.framework.name
yarn
vi yarn-site.xml,写入
yarn.nodemanager.aux-services mapreduce\_shuffle yarn.resourcemanager.ha.enabled true yarn.resourcemanager.cluster-id cluster1 yarn.resourcemanager.ha.rm-ids rm1,rm2 yarn.resourcemanager.hostname.rm1 node03 yarn.resourcemanager.hostname.rm2 node04 yarn.resourcemanager.zk-address node02:2181,node03:2181,node04:2181然后
scp mapred-site.xml yarn-site.xml node02:`pwd`
scp mapred-site.xml yarn-site.xml node03:`pwd`
scp mapred-site.xml yarn-site.xml node04:`pwd`
在管理节点node01启动:start-yarn.sh
在node03和node04:yarn-daemon.sh start resourcemanager
至此http://node03:8088和http://node04:8088可以成功启动就ok了
停止:stop-yarn.sh
在node03和node04:yarn-daemon.sh stop resourcemanager