将文件从不安全的 hdfs 传输到安全的 hdfs 集群

Transfer of files from unsecured hdfs to secured hdfs cluster

我想将文件从不安全的 HDFS 集群传输到 kerberized 集群。我正在使用 distcp 来传输文件。我使用了以下命令。

hadoop distcp -D ipc.client.fallback-to-simple-auth-allowed=true hdfs://<ip>:8020/<sourcedir> hdfs://<ip>:8020/<destinationdir>

在 kerberized 集群中执行上述命令后出现以下错误。

java.io.EOFException: End of File Exception between local host is: "<xxx>"; destination host is: "<yyy>; : java.io.EOFException; For more details see:  http://wiki.apache.org/hadoop/EOFException

这是一个错误,因为:

cluster is blocked for RPC communication, in such cases, webhdfs protocol can be used, so above distcp can be rewritten as

hadoop distcp -D ipc.client.fallback-to-simple-auth-allowed=true hdfs://xxx:8020/src_path webhdfs://yyy:50070/target_path

这个很好blog post for distcp