将本地数据复制到hadoop hdfs错误 [英] Copy local data to hadoop hdfs error
本文介绍了将本地数据复制到hadoop hdfs错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近安装/配置了hadoop,并试图运行一些测试。我的问题是将本地数据复制到hdfs:
当我尝试运行时
hdfs dfs -copyFromLocal / home / develop / test / test
或任何类似的命令,所有我得到的是:
pre $ copyFromLocal:`test':没有这样的文件或目录
如果我运行 ls
,我会得到相同的输出:
开发@ ubuntu:〜$ hdfs dfs -ls
ls:`。':没有这样的文件或目录
我也尝试用 hdfs创建目录
,但不成功,我到底遗漏了什么? test
dfs -mkdir
解决方案
在HDFS中添加斜杠
例如,
hdfs dfs -mkdir / test
hdfs dfs -copyFromLocal / home / develop / test / / test
I recently installed/configured hadoop and curently trying to run some tests. My problem is with copying local data to hdfs:
When I try to run
hdfs dfs -copyFromLocal /home/develop/test/ test
or any similar command, all i get is:
copyFromLocal: `test': No such file or directory
if I run ls
, i get the same output:
develop@ubuntu:~$ hdfs dfs -ls
ls: `.': No such file or directory
I also tried to create the directory test
with hdfs dfs -mkdir
, but unsuccessful, what exactly am I missing ?
解决方案
Add slash in the HDFS path.
For example,
hdfs dfs -mkdir /test
hdfs dfs -copyFromLocal /home/develop/test/ /test
这篇关于将本地数据复制到hadoop hdfs错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文