首页 > 其他 > 详细

【Hadoop】Hadoop HA 高可用搭建手册

时间:2020-04-02 19:39:52      阅读:50      评论:0      收藏:0      [点我收藏+]

core-site.xml 配置

<configuration>

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

?<property>
  <!---fsimage and edits-->
?  <name>hadoop.tmp.dir</name>
?  <value>/usr/local/hadoop-2.5.1/tmp</value>
?</property>

?<property>
?  <name>hadoop.http.staticuser.user</name>
?  <value>root</value>
?</property>?

<property>
?  <name>ha.ZooKeeper.quorum</name>?
   <value>masternode,standbyNN,slave</value>
?</property>?

</configuration>

hdfs-site.xml 配置

<configuration> 
  <property> 
    <name>dfs.nameservices</name>  
    <value>mycluster</value> 
  </property>

  <property> 
    <name>dfs.ha.namenodes.mycluster</name>  
    <value>nn1,nn2</value> 
  </property>  

  <!--rpc 通讯端口-->
  <property> 
    <name>dfs.namenode.rpc-address.mycluster.nn1</name>  
    <value>masternode:8020</value> 
  </property>  
  <property> 
    <name>dfs.namenode.rpc-address.mycluster.nn2</name>  
    <value>standbyNN:8020</value> 
  </property>  

  <!--web 访问端口-->
  <property> 
    <name>dfs.namenode.http-address.mycluster.nn1</name>  
    <value>masternode:50070</value> 
  </property>  
  <property> 
    <name>dfs.namenode.http-address.mycluster.nn2</name>  
    <value>standbyNN:50070</value> 
  </property> 
    
 <!--用于共享编辑日志的journal节点列表-->
  <property> 
    <name>dfs.namenode.shared.edits.dir</name>  
    <value>qjournal://masternode:8485;standbyNN:8485;slave:8485/mycluster</value> 
  </property>  

  <property> 
    <name>dfs.client.failover.proxy.provider.mycluster</name>
   <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
  </property> 

  <property> 
    <name>dfs.ha.fencing.methods</name>  
    <value>sshfence</value> 
  </property>

  <property> 
    <name>dfs.ha.fencing.ssh.private-key-files</name>  
    <value>/root/.ssh/id_rsa</value> 
  </property> 
 
  <!--journalnode 上用于存放edits日志的目录-->
  <property> 
    <name>dfs.journalnode.edits.dir</name>  
    <value>/opt/journalnode/data</value> 
  </property>  

  <property> 
    <name>dfs.ha.automatic-failover.enabled</name>  
    <value>true</value> 
  </property> 
  
</configuration>

【Hadoop】Hadoop HA 高可用搭建手册

原文:https://www.cnblogs.com/jzsg/p/12622214.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!