2017-02-15 64 views
1

我想將文件從不安全的HDFS羣集傳輸到kerberized羣集。我正在使用distcp傳輸文件。我已經使用了以下命令。將文件從不安全的hdfs傳輸到受保護的hdfs羣集

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 
+1

你可以試試使用'webhdfs:/'而不是'hdfs:/'? –

+1

兩個集羣uris'? –

+1

試用webhdfs。但得到異常'17/02/15 11:42:17 ERROR tools.DistCp:無效參數:java.io.IOException:意外的HTTP響應:代碼= 404!= 200,操作= GETDELEGATIONTOKEN,消息=未找到' –

回答

2

這是錯誤的,因爲:

簇被阻塞RPC通信,在這種情況下,webhdfs 協議可以被使用,所以上述DistCp使用可改寫爲

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