问题
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
来源:https://stackoverflow.com/questions/36445154/copy-a-file-using-webhdfs