Copy a file using WebHDFS

允我心安 提交于 2019-12-13 18:50:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!