Hdfs(HAdoop)数据拷贝

时间:2017-11-30 20:35:17

标签: hdfs bigdata

如何将文件从shell复制到hdfs主目录(本地)。

我尝试使用:

hdfs dfs -copyFromLocal /home/shell/test.txt/ test (Error No such files)
hdfs dfs -put /home/shell/test1.txt/ test (Error)

任何帮助将不胜感激。

2 个答案:

答案 0 :(得分:0)

如果我的理解是正确的,您想要将文件从Local复制到hdfs。 如果是,那么

hdfs dfs -copyFromLocal“path / to / your / local / file”“path / to / copy / on / hdfs”

通常,hdfs上的路径类似于/ user / hdfs / xxxx

答案 1 :(得分:0)

试试这个

> Hadoop fs -copyFromLocal /local_path.txt / hdfs_path

  

相关问题