HA配置之core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
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.
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<!-- 把多个NameNode的地址组装成一个集群mycluster -->
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
<!-- 指定hadoop运行时产生文件的存储目录 -->
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/module/hadoop-3.1.3/data</value>
</property>
<!-- 配置HDFS网页登录使用的静态用户为rainys -->
<property>
<name>hadoop.http.staticuser.user</name>
<value>rainys</value>
</property>
<!-- 配置该rainys(superUser)允许通过代理访问的主机节点 -->
<property>
<name>hadoop.proxyuser.rainys.hosts</name>
<value>*</value>
</property>
<!-- 配置该rainys(superUser)允许通过代理用户所属组 -->
<property>
<name>hadoop.proxyuser.rainys.groups</name>
<value>*</value>
</property>
<!-- 配置该rainys(superUser)允许通过代理的用户-->
<property>
<name>hadoop.proxyuser.rainys.users</name>
<value>*</value>
</property>
<!-- 指定zkfc要连接的zkServer地址 -->
<property>
<name>ha.zookeeper.quorum</name>
<value>hadoop102:2181,hadoop105:2181,hadoop106:2181</value>
</property>
</configuration>

浙公网安备 33010602011771号