text: <?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>
  	<!--指定hdfs的nameservice为ns1，需要和core-site.xml中的保持一致 -->
  	<property>
  	    <name>dfs.nameservices</name>
  	    <value>ns1</value>
  	</property>
  	<!-- ns1下面有两个NameNode，分别是nn1，nn2 -->
  	<property>
  	    <name>dfs.ha.namenodes.ns1</name>
  	    <value>nn1,nn2</value>
  	</property>
  	<!-- nn1的RPC通信地址 -->
  	<property>
  	    <name>dfs.namenode.rpc-address.ns1.nn1</name>
  	    <value>uplooking01:9000</value>
  	</property>
  	<!-- nn1的http通信地址 -->
  	<property>
  	    <name>dfs.namenode.http-address.ns1.nn1</name>
  	    <value>uplooking01:50070</value>
  	</property>
  	<!-- nn2的RPC通信地址 -->
  	<property>
  	    <name>dfs.namenode.rpc-address.ns1.nn2</name>
  	    <value>uplooking02:9000</value>
  	</property>
  	<!-- nn2的http通信地址 -->
  	<property>
  	    <name>dfs.namenode.http-address.ns1.nn2</name>
  	    <value>uplooking02:50070</value>
  	</property>
  	<!-- 指定NameNode的元数据在JournalNode上的存放位置 -->
  	<property>
  	    <name>dfs.namenode.shared.edits.dir</name>
  	    <value>qjournal://uplooking01:8485;uplooking02:8485;uplooking03:8485/ns1</value>
  	</property>
  	<!-- 指定JournalNode在本地磁盘存放数据的位置 -->
  	<property>
  	    <name>dfs.journalnode.edits.dir</name>
  	    <value>/home/uplooking/data/hadoop/journal</value>
  	</property>
  	<property>  
  	    <name>dfs.namenode.name.dir</name>  
  	    <value>/home/uplooking/data/hadoop/name</value>  
  	</property>  
  	<property>  
  	    <name>dfs.datanode.data.dir</name>  
  	    <value>/home/uplooking/data/hadoop/data</value>  
  	</property> 
  	<!-- 开启NameNode失败自动切换 -->
  	<property>
  	    <name>dfs.ha.automatic-failover.enabled</name>
  	    <value>true</value>
  	</property>
  	<!-- 配置失败自动切换实现方式 -->
  	<property>
  	    <name>dfs.client.failover.proxy.provider.ns1</name>
  	    <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
  	</property>
  </configuration>
  