问题描述
如何使用httpfs将文件复制到hdfs中的另一个目录.例如,我可以使用( http://1.12.134.1234:2020/webhdfs/v1/user/xx/x?op=create&user=hello )来创建文件.我在 https://中找不到hadoop.apache.org/docs/stable2/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#File_and_Directory_Operations
How to use httpfs to copy a file in to another directory in hdfs. for example, I can use (http://1.12.134.1234:2020/webhdfs/v1/user/xx/x?op=create&user=hello) to create a file. I did not find in https://hadoop.apache.org/docs/stable2/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#File_and_Directory_Operations
推荐答案
没有webhdfs的复制"命令.使用hadoop distcp命令(或检索内容,创建新文件,如果预期文件很小,则写入内容).使用WebHDFS复制文件也可以回答该问题.
There is no webhdfs 'copy'command. Use hadoop distcp command (or retrieve contents, create new file, write the contents if the file is expected to be a smallish one). Copy a file using WebHDFS also answers the question.
这篇关于如何使用webhdfs rest api复制文件并将其存储在另一个目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!