hadoop配置文件core-site.xml

来源:互联网 发布:淘宝发货无需物流 编辑:程序博客网 时间:2024/05/22 02:24
<?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路径。当有多个HDFS集群同时工作时,用户如果不写集群名称,那么默认使用哪个哪?在这里指定!该值来自于hdfs-site.xml中的配置-->

    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://mycluster</value>

    </property>


<!---这里的路径默认是NameNode、DataNode、JournalNode等存放数据的公共目录->

    <property>
        <name>hadoop.tmp.dir</name>
        <value>/opt/modules/hadoop-2.5.0/data</value>

    </property>


<!--这里是ZooKeeper集群的地址和端口。注意,数量一定是奇数,且不少于三个节点-->

    <property>
       <name>ha.zookeeper.quorum</name>
       <value>hadoop-senior01.beifeng.com:2181,hadoop-senior04.beifeng.com:2181,hadoop-senior03.beifeng.com:2181</value>
     </property>
</configuration>

0 0
原创粉丝点击