一个hadoop hdfs put 文件失败的小情况

/root/abc

sudo -u hdfs hdfs dfs -put abc /user/larry

然而,提示“put: `abc': No such file or directory”。

一通折腾之后,终于找到原因(我认为的原因):

用户hdfs 无法访问/root下的文件,无法访问ug为root:root的文件。

 

所以,解决方法就是①将abc移到/home/larry等地方,②然后使用用户larry来上传到/user/larry目录。

So, the solution is ① put the file anywhere beyond directory ‘/root’,  ② do the ‘hdfs put’ with corresponding user.

 

注意,两个条件缺一不可。

posted on 2017-03-19 00:20  LarryZeal  阅读(1544)  评论(0编辑  收藏  举报

导航