hadoop2.7.3 HA YARN 環境搭建
阿新 • • 發佈:2019-02-17
<configuration> <!-- Site specific YARN configuration properties --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> <property> <name>yarn.nodemanager.auxservices.mapreduce.shuffle.class</name> <value>org.apache.hadoop.mapred.ShuffleHandler</value> </property> <property> <name>yarn.nodemanager.local-dirs</name> <value>/home/hadoop/yarn/local</value> </property> <property> <name>yarn.nodemanager.log-dirs</name> <value>/home/hadoop/yarn/log</value> </property> <property> <name>mapreduce.shuffle.port</name> <value>23080</value> </property> <property> <name>yarn.resourcemanager.ha.enabled</name> <value>true</value> </property> <property> <name>yarn.resourcemanager.cluster-id</name> <value>myhdfs</value> </property> <property> <name>yarn.resourcemanager.ha.rm-ids</name> <value>nn1,nn2</value> </property> <!-- in every host the id is diferent --> <property> <name>yarn.resourcemanager.ha.id</name> <value>nn1</value> </property> <property> <name>ha.zookeeper.quorum</name> <value>host1:2181,host2:2181,host3:2181</value> </property> <property> <name>yarn.resourcemanager.ha.automatic-failover.enabled</name> <value>true</value> </property> <property> <name>yarn.resourcemanager.hostname.nn1</name> <value>host1</value> </property> <property> <name>yarn.resourcemanager.hostname.nn2</name> <value>host2</value> </property> <property> <name>yarn.resourcemanager.recovery.enabled</name> <value>true</value> </property> <property> <name>yarn.resourcemanager.store.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore</value> </property> <property> <name>yarn.resourcemanager.zk-state-store.address</name> <value>host1:2181,host2:2181,host3:2181</value> </property> <property> <name>yarn.resourcemanager.zk-address</name> <value>host1:2181,host2:2181,host3:2181</value> </property> <property> <name>yarn.app.mapreduce.am.scheduler.connection.wait.interval-ms</name> <value>5000</value> </property> <property> <name>yarn.nodemanager.resource.memory-mb</name> <value>1024</value> </property> <!-- nn1 --> <property> <name>yarn.resourcemanager.address.nn1</name> <value>host1:8032</value> </property> <property> <name>yarn.resourcemanager.scheduler.address.nn1</name> <value>host1:8030</value> </property> <property> <name>yarn.resourcemanager.webapp.address.nn1</name> <value>host1:8088</value> </property> <property> <name>yarn.resourcemanager.resource-tracker.address.nn1</name> <value>host1:8031</value> </property> <property> <name>yarn.resourcemanager.admin.address.nn1</name> <value>host1:8033</value> </property> <property> <name>yarn.resourcemanager.ha.admin.address.nn1</name> <value>host1:23142</value> </property> <!-- nn2 --> <property> <name>yarn.resourcemanager.address.nn2</name> <value>host2:8032</value> </property> <property> <name>yarn.resourcemanager.scheduler.address.nn2</name> <value>host2:8030</value> </property> <property> <name>yarn.resourcemanager.webapp.address.nn2</name> <value>host2:8088</value> </property> <property> <name>yarn.resourcemanager.resource-tracker.address.nn2</name> <value>host2:8031</value> </property> <property> <name>yarn.resourcemanager.admin.address.nn2</name> <value>host2:8033</value> </property> <property> <name>yarn.resourcemanager.ha.admin.address.nn2</name> <value>host2:23142</value> </property> <property> <name>yarn.client.failover-proxy-provider</name> <value>org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider</value> </property> <property> <name>yarn.resourcemanager.ha.automatic-failover.zk-base-path</name> <value>/yarn-leader-election</value> </property> </configuration>