about云开发

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 376|回复: 3
打印 上一主题 下一主题

两个均是HDFS HA集群间的数据拷贝问题

[复制链接]
楼主
发表于 2018-2-11 21:40:22 | 显示全部楼层
那就需要修改配置了。
修改下hdfs-site.xml,例子如下
[XML] 纯文本查看 复制代码
<configuration>
  
  <!-- services -->
  <property>
    <name>dfs.nameservices</name>  
    <value>serviceId1,serviceId2</value>
  </property>
  
  <!-- serviceId2 properties --> 
  <property>   
    <name>dfs.client.failover.proxy.provider.nameservices2</name> 
    <value>org.apache.hadoop.hdfs.server  
               .namenode.ha.ConfiguredFailoverProxyProvider</value>
  </property> 
  <property> 
    <name>dfs.ha.namenodes.serviceId2</name>    
    <value>nn201,nn202</value> 
  </property>
  <property> 
    <name>dfs.namenode.rpc-address.serviceId2.nn201</name> 
    <value>nn201.pro.net:8020</value>
  </property> 
  <property> 
    <name>dfs.namenode.servicerpc-address.serviceId2.nn201</name> 
    <value>nn201.pro.net:54321</value> 
  </property>
  <property>
    <name>dfs.namenode.http-address.serviceId2.nn201</name> 
    <value>nn201.pro.net:50070</value>
  </property>
  <property> 
    <name>dfs.namenode.https-address.serviceId2.nn201</name> 
    <value>nn201.prod.com:50470</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.serviceId2.nn202</name> 
    <value>nn202.pro.net:8020</value>
  </property>
  <property>
    <name>dfs.namenode.servicerpc-address.serviceId2.nn202</name> 
    <value>nn202.pro.net:54321</value>
  </property>
  <property>
    <name>dfs.namenode.http-address.serviceId2.nn202</name>
    <value>nn202.pro.net:50070</value>
  </property>
  <property> 
    <name>dfs.namenode.https-address.serviceId2.nn202</name>  
    <value>nn202.prod.net:50470</value>
  </property>

  <!—- serviceId1 -->
  <property>
    <name>dfs.client.failover.proxy.provider.nameservices1</name>     
      <value>org.apache.hadoop.hdfs.server.namenode.ha.          
                       ConfiguredFailoverProxyProvider</value> 
  </property> 
  <property> 
    <name>dfs.ha.namenodes.nameservices1</name> 
    <value>nn101,nn102</value>
  </property>
  <property>   
    <name>dfs.namenode.rpc-address.serviceId1.nn101</name> 
    <value>nn101.poc.net:8020</value>
  </property>
  <property>
    <name>dfs.namenode.servicerpc-address.serviceId1.nn101</name>   
    <value>nn101.poc.net:54321</value>
  </property>
  <property>
    <name>dfs.namenode.http-address.serviceId1.nn101</name> 
    <value>nn101.poc.net:50070</value>
  </property>
  <property> 
    <name>dfs.namenode.https-address.serviceId1.nn101</name> 
    <value>nn101.poc.net:50470</value>
  </property>
  <property>
    <name>dfs.namenode.rpc-address.serviceId1.nn102</name>
    <value>nn102.poc.net:8020</value>
  </property>
  <property>
    <name>dfs.namenode.servicerpc-address.serviceId1.nn102</name> 
    <value>nn102.poc.net:54321</value>
  </property>
  <property> 
    <name>dfs.namenode.http-address.serviceId1.nn102</name> 
     <value>nn102.poc.net:50070</value>
  </property>
  <property>
    <name>dfs.namenode.https-address.serviceId1.nn102</name> 
    <value>nn102.poc.net:50470</value>
  </property>
  …  
</configuration>


欢迎加入about云群425860289432264021 ,云计算爱好者群,关注about云腾讯认证空间
沙发
发表于 2018-2-11 21:45:49 | 显示全部楼层
欢迎加入about云群425860289432264021 ,云计算爱好者群,关注about云腾讯认证空间
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /3 下一条

QQ|小黑屋|about云开发-学问论坛|社区-大数据云技术学习分享平台 ( 京ICP备12023829号

GMT+8, 2018-2-24 19:59 , Processed in 0.324556 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表