Copy a file using WebHDFS

2019-07-25 16:02发布

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条回答
我命由我不由天
2楼-- · 2019-07-25 16:52

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
查看更多
登录 后发表回答