使用WebHDFS复制文件 [英] Copy a file using WebHDFS
本文介绍了使用WebHDFS复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法从一个文件(比如说)复制一个文件 hdfs:// old
到 hdfs:// new $ c没有先下载文件,然后再上传它?
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?
推荐答案
不知道WebHDFS,但这是可以实现的使用 hadoop distcp 。
该命令如下所示:
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
这篇关于使用WebHDFS复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文