在要执行distcp 的客户端配置添加
dfs.internal.nameservices 指local service 就是client 所在的hadoop 的逻辑名称
<!-- services -->
<!-- local sevice and remote service -->
<property>
<name>dfs.nameservices</name>
<value>ns1,ns8</value>
</property>
<!-- service ns8 -->
<property>
<name>dfs.nameservices</name>
<value>ns8</value>
</property>
<property>
<name>dfs.ha.namenodes.ns8</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ns8.nn1</name>
<value>192.168.200.140:8020</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ns8.nn2</name>
<value>192.168.200.141:8020</value>
</property>
<property>
<name>dfs.namenode.http-address.ns8.nn1</name>
<value>192.168.200.140:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.ns8.nn2</name>
<value>192.168.200.141:50070</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.ns8</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>
<!-- service ns1 -->
<!-- local sevice -->
<property>
<name>dfs.internal.nameservices</name>
<value>ns1</value>
</property>
<property>
<name>dfs.ha.namenodes.ns1</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ns1.nn1</name>
<value>dev01:8020</value>
</property>
<property>
<name>dfs.namenode.rpc-address.ns1.nn2</name>
<value>dev02:8020</value>
</property>
<property>
<name>dfs.namenode.http-address.ns1.nn1</name>
<value>dev01:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.ns1.nn2</name>
<value>dev02:50070</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.ns1</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>