1. 程式人生 > >yarn-site.xml的配置內容

yarn-site.xml的配置內容

tin shuffle ide 一個 1.0 distrib val alloc class

<?xml version="1.0"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
--> <configuration> <!-- Site specific YARN configuration properties --> <property> <name>yarn.resourcemanager.ha.enabled</name> <value>true</value> </property> <property> <name>yarn.resourcemanager.cluster-id</name> <value
>zz</value> </property> <property> <name>yarn.resourcemanager.ha.rm-ids</name> <value>rm1,rm2</value> </property> <property> <name>yarn.resourcemanager.hostname.rm1</name> <value>host1</value> </property> <property
> <name>yarn.resourcemanager.hostname.rm2</name> <value>host2</value> </property> <property> <name>yarn.resourcemanager.webapp.address.rm1</name> <value>host1:8088</value> </property> <property> <name>yarn.resourcemanager.webapp.address.rm2</name> <value>host2:8088</value> </property> <!-- <property> <name>yarn.resourcemanager.address.rm1</name> <value>host1:8132</value> </property> <property> <name>yarn.resourcemanager.address.rm2</name> <value>host2:8132</value> </property> <property> <name>yarn.resourcemanager.scheduler.address.rm1</name> <value>host1:8130</value> </property> <property> <name>yarn.resourcemanager.scheduler.address.rm2</name> <value>host2:8130</value> </property> <property> <name>yarn.resourcemanager.resource-tracker.address.rm1</name> <value>host1:8131</value> </property> <property> <name>yarn.resourcemanager.resource-tracker.address.rm2</name> <value>host2:8131</value> </property> <property> <name>yarn.resourcemanager.webapp.address.rm1</name> <value>host1:8088</value> </property> <property> <name>yarn.resourcemanager.webapp.address.rm2</name> <value>host2:8088</value> </property> --> <property> <name>ha.zookeeper.quorum</name> <value>host1:2181,host2:2181,host3:2181</value> </property> <property> <name>yarn.resourcemanager.zk-state-store.address</name> <value>host1:2181,host2:2181,host3:2181</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-address</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.connect.retry-interval.ms</name> <value>2000</value> </property> <property> <name>yarn.resourcemanager.recovery.enabled</name> <value>true</value> </property> <property> <name>yarn.app.mapreduce.am.scheduler.connection.wait.interval-ms</name> <value>5000</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> <!-- 資源調度模型 --> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle,spark_shuffle</value> </property> <property> <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name> <value>org.apache.hadoop.mapred.ShuffleHandler</value> </property> <!-- spark on yarn 動態資源分配調度模型類 --> <property> <name>yarn.nodemanager.aux-services.spark_shuffle.class</name> <value>org.apache.spark.network.yarn.YarnShuffleService</value> </property> <!-- spark on yarn 動態資源分配服務接口 --> <property> <name>spark.shuffle.service.port</name> <value>7337</value> </property> <property> <name>yarn.nodemanager.local-dirs</name> <value>/home/cloudz/install/hadoop-2.9.0/tmp</value> </property> <property> <name>yarn.nodemanager.log-dirs</name> <value>/home/cloudz/install/hadoop-2.9.0/logs</value> </property> <!-- 一個container可申請的最小內存 --> <property> <name>yarn.scheduler.minimum-allocation-mb</name> <value>512</value> </property> <!-- 一個container可以申請的最大內存 --> <property> <name>yarn.scheduler.maximum-allocation-mb</name> <value>4096</value> </property> <!-- nodemanager可使用內存資源大小 --> <property> <name>yarn.nodemanager.resource.memory-mb</name> <value>16384</value> </property> <!-- 虛擬內存倍數 --> <property> <name>yarn.nodemanager.vmem-pmem-ratio</name> <value>4.2</value> <description>允許的虛擬內存倍數</description> </property> <!-- nodemanager可使用的最大cpu個數 是個虛數並不一定需要跟物理cpu個數匹配可以更多 --> <property> <name>yarn.nodemanager.resource.cpu-vcores</name> <value>8</value> </property> <!-- 開啟mapreduce中間過程壓縮 --> <property> <name>mapreduce.map.output.compress</name> <value>true</value> </property> <property> <name>mapreduce.map.output.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> </property> <property> <name>mapreduce.output.fileoutputformat.compress</name> <value>true</value> </property> <property> <name>mapreduce.output.fileoutputformat.compress.codec</name> <value>org.apache.hadoop.io.compress.SnappyCodec</value> <description>數據的壓縮類型,這裏使用Snappy壓縮</description> </property> <property> <name>mapreduce.output.fileoutputformat.compress.type</name> <value>BLOCK</value> <description>數據的壓縮級別,這裏設置按數據塊壓縮</description> </property> <property> <name>yarn.log-aggregation-enable</name> <value>true</value> <description>開啟application 日誌聚合功能</description> </property> <property> <name>yarn.log-aggregation.retain-seconds</name> <value>259200</value> <description>設置聚合日誌保存時間3天</description> </property> <property> <name>yarn.log-aggregation.retain-check-interval-seconds</name> <value>86400</value> <description>清理過期聚合日誌程序的執行間隔時間</description> </property> <property> <name>yarn.nodemanager.remote-app-log-dir</name> <value>/tmp/logs</value> <description>聚合日誌在hdfs上的目錄</description> </property> <!-- <property> <name>yarn.nodemanager.remote-app-log-dir-suffix</name> <value></value> <description>聚合日誌在hdfs上的目錄分層方式</description> </property> --> <property> <name>yarn.log.server.url</name> <value>http://host1.bjcq.zybang.com:19888/jobhistory/logs</value> <description>歷史日誌對應路徑</description> </property> <!-- 開啟容量調度模式 --> <property> <name>yarn.resourcemanager.scheduler.class</name> <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value> <description> 配置yarn啟用容量調度模式(默認即是容量調度),配置文件為capacity-scheduler.xml </description> </property> </configuration>

yarn-site.xml的配置內容