zoukankan      html  css  js  c++  java
  • hdfs-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 HA配置 -->
    <property>
    <name>dfs.nameservices</name>
    <value>ns</value>
    <description>指定hdfs的nameservice为ns,需要和core-site.xml中的保持一致</description>
    </property>
    <property>
    <name>dfs.ha.namenodes.ns</name>
    <value>nn1,nn2</value>
    <description>ns命名空间下有两个NameNode,逻辑代号,随便起名字,分别是nn1,nn2</description>
    </property>
    <property>
    <name>dfs.namenode.rpc-address.ns.nn1</name>
    <value>node01:9000</value>
    <description>nn1的RPC通信地址</description>
    </property>
    <property>
    <name>dfs.namenode.http-address.ns.nn1</name>
    <value>node01:50070</value>
    <description>nn1的http通信地址</description>
    </property>
    <property>
    <name>dfs.namenode.rpc-address.ns.nn2</name>
    <value>node02:9000</value>
    <description>nn2的RPC通信地址</description>
    </property>
    <property>
    <name>dfs.namenode.http-address.ns.nn2</name>
    <value>node02:50070</value>
    <description>nn2的http通信地址</description>
    </property>
    <!--JournalNode配置 -->
    <property>
    <name>dfs.namenode.shared.edits.dir</name>
    <value>qjournal://node03:8485;node04:8485;node05:8485/ns</value>
    <description>指定NameNode的edits元数据在JournalNode上的存放位置</description>
    </property>
    <property>
    <name>dfs.journalnode.edits.dir</name>
    <value>/usr/local/hadoop/journaldata</value>
    <description>指定JournalNode在本地磁盘存放数据的位置</description>
    </property>
    <!--namenode高可用主备切换配置 -->
    <property>
    <name>dfs.ha.automatic-failover.enabled</name>
    <value>true</value>
    <description>开启NameNode失败自动切换</description>
    </property>
    <property>
    <name>dfs.client.failover.proxy.provider.ns</name>
    <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
    <description>配置失败自动切换实现方式,使用内置的zkfc</description>
    </property>
    <property>
    <name>dfs.ha.fencing.methods</name>
    <value>
    sshfence
    shell(/bin/true)
    </value>
    <description>配置隔离机制,多个机制用换行分割,先执行sshfence,执行失败后执行shell(/bin/true),/bin/true会直接返回0表示成功</description>
    </property>
    <property>
    <name>dfs.ha.fencing.ssh.private-key-files</name>
    <value>/home/hadoop/.ssh/id_rsa</value>
    <description>使用sshfence隔离机制时需要ssh免登陆</description>
    </property>
    <property>
    <name>dfs.ha.fencing.ssh.connect-timeout</name>
    <value>30000</value>
    <description>配置sshfence隔离机制超时时间</description>
    </property>
    <!--dfs文件属性设置-->
    <property>
    <name>dfs.replication</name>
    <value>3</value>
    <description>设置block副本数为3</description>
    </property>

    <property>
    <name>dfs.block.size</name>
    <value>134217728</value>
    <description>设置block大小是128M</description>
    </property>
    </configuration>

  • 相关阅读:
    HDU1536_SNim_求sg值
    HDU1851_A Simple Game_求sg
    POJ1067_取石子游戏_威佐夫博弈
    HDU1848_Fibonacci again and again_经典的求sg
    POJ2425 && HDU1524_ A Chess Game_树形博弈
    .GB级数据库分区实现高性能
    数据库锁
    热烈庆祝“mysql 集群数据库架构成功”
    linux mysql注意事项
    SQL Server 数据库做读写分离
  • 原文地址:https://www.cnblogs.com/llphhl/p/8847879.html
Copyright © 2011-2022 走看看