异常 hadoop java.net.ConnectException: Connection timed out: no further information
- 原因:
远程集群是某云(有内外IP地址)
解决方式 在hdfs-site.xml 添加如下配置
<property>
<name>dfs.client.use.datanode.hostname</name>
<value>true</value>
<description>only cofig in clients</description>
</property>
在api 中添加
conf.set("dfs.client.use.datanode.hostname", "true");