目前仅以下文件中的参数支持自定义配置: HDFS:core-site.xml、hdfs-site.xml、hadoop-env.sh、log4j.properties YARN:yarn-site.xml、mapred-site.xml、fair-scheduler.xml、capacity-scheduler.xml、yarn-env.sh、mapred-env.sh Hive:hive-site.xml、hive-env.sh、hive-log4j2.properties
[{"serviceName": "HDFS","classification": "hdfs-site.xml","serviceVersion": "2.8.4","properties": {"dfs.blocksize": "67108864","dfs.client.slow.io.warning.threshold.ms": "900000","output.replace-datanode-on-failure": "false"}},{"serviceName": "YARN","classification": "yarn-site.xml","serviceVersion": "2.8.4","properties": {"yarn.app.mapreduce.am.staging-dir": "/emr/hadoop-yarn/staging","yarn.log-aggregation.retain-check-interval-seconds": "604800","yarn.scheduler.minimum-allocation-vcores": "1"}},{"serviceName": "YARN","classification": "capacity-scheduler.xml","serviceVersion": "2.8.4","properties": {"content": "<?xml version=\\"1.0\\" encoding=\\"UTF-8\\"?>\\n<?xml-stylesheet type=\\"text/xsl\\" href=\\"configuration.xsl\\"?>\\n<configuration><property>\\n <name>yarn.scheduler.capacity.maximum-am-resource-percent</name>\\n <value>0.8</value>\\n</property>\\n<property>\\n <name>yarn.scheduler.capacity.maximum-applications</name>\\n <value>1000</value>\\n</property>\\n<property>\\n <name>yarn.scheduler.capacity.root.default.capacity</name>\\n <value>100</value>\\n</property>\\n<property>\\n <name>yarn.scheduler.capacity.root.default.maximum-capacity</name>\\n <value>100</value>\\n</property>\\n<property>\\n <name>yarn.scheduler.capacity.root.default.user-limit-factor</name>\\n <value>1</value>\\n</property>\\n<property>\\n <name>yarn.scheduler.capacity.root.queues</name>\\n <value>default</value>\\n</property>\\n</configuration>"}}]
<property><name>dfs.ha.namenodes.HDFS8088</name><value>nn1,nn2</value></property><property><name>dfs.namenode.http-address.HDFS8088.nn1</name><value>172.21.16.11:4008</value></property><property><name>dfs.namenode.https-address.HDFS8088.nn1</name><value>172.21.16.11:4009</value></property><name>dfs.namenode.rpc-address.HDFS8088.nn1</name><value>172.21.16.11:4007</value><property><name>dfs.namenode.http-address.HDFS8088.nn2</name><value>172.21.16.40:4008</value></property><property><name>dfs.namenode.https-address.HDFS8088.nn2</name><value>172.21.16.40:4009</value></property><property><name>dfs.namenode.rpc-address.HDFS8088.nn2</name><value>172.21.16.40:4007</value><property>
[{"serviceName": "HDFS","classification": "hdfs-site.xml","serviceVersion": "2.7.3","properties": {"newNameServiceName": "newEmrCluster","dfs.ha.namenodes.HDFS8088": "nn1,nn2","dfs.namenode.http-address.HDFS8088.nn1": "172.21.16.11:4008","dfs.namenode.https-address.HDFS8088.nn1": "172.21.16.11:4009","dfs.namenode.rpc-address.HDFS8088.nn1": "172.21.16.11:4007","dfs.namenode.http-address.HDFS8088.nn2": "172.21.16.40:4008","dfs.namenode.https-address.HDFS8088.nn2": "172.21.16.40:4009","dfs.namenode.rpc-address.HDFS8088.nn2": "172.21.16.40:4007"}}]
访问的外部集群只支持高可用集群。 访问的外部集群只支持未开启 kerberos 的集群。
<property><name>dfs.ha.namenodes.HDFS8088</name><value>nn1,nn2</value></property><property><name>dfs.namenode.http-address.HDFS8088.nn1</name><value>172.21.16.11:4008</value></property><property><name>dfs.namenode.https-address.HDFS8088.nn1</name><value>172.21.16.11:4009</value></property><name>dfs.namenode.rpc-address.HDFS8088.nn1</name><value>172.21.16.11:4007</value><property><name>dfs.namenode.http-address.HDFS8088.nn2</name><value>172.21.16.40:4008</value></property><property><name>dfs.namenode.https-address.HDFS8088.nn2</name><value>172.21.16.40:4009</value></property><property><name>dfs.namenode.rpc-address.HDFS8088.nn2</name><value>172.21.16.40:4007</value><property>
hdfs-site.xml
文件。HDFS80238,HDFS8088
。配置项 | 配置值 |
dfs.ha.namenodes.HDFS8088 | nn1,nn2 |
fs.namenode.http-address.HDFS8088.nn1 | 172.21.16.11:4008 |
dfs.namenode.https-address.HDFS8088.nn1 | 172.21.16.11:4009 |
dfs.namenode.rpc-address.HDFS8088.nn1 | 172.21.16.11:4007 |
fs.namenode.http-address.HDFS8088.nn2 | 172.21.16.40:4008 |
dfs.namenode.https-address.HDFS8088.nn2 | 172.21.16.40:4009 |
dfs.namenode.rpc-address.HDFS8088.nn2 | 172.21.16.40:4007 |
dfs.client.failover.proxy.provider.HDFS8088 | org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider |
dfs.internal.nameservices | HDFS80238 |
dfs.internal.nameservice 需要新增,否则扩容集群后可能导致 datanode 上报异常而被 namenode 标记为 dead。
本页内容是否解决了您的问题?