Is there a way to copy a file from (let's say) hdfs://old
to hdfs://new
without first downloading the file and then uploading it again?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Don't know about WebHDFS, but this is achievable using hadoop distcp. The command looks something like this:
hadoop distcp hdfs://old_nn:8020/old/location/path.file hdfs://new_nn:8020/new/location/path.file