无法将目录上传到hdfs。 `/ usr / local / tmp /':没有这样的文件或目录 [英] Unable to upload directory to hdfs. `/usr/local/tmp/': No such file or directory

查看:562
本文介绍了无法将目录上传到hdfs。 `/ usr / local / tmp /':没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将目录中的文件上传到我在HDFS上创建的目录,但由于ubuntu无法在我的机器上找到这些文件,因此我无法做到这一点。
目录'状态'(其中一个我试图上传)包含50个txt文件,位于我的下载文件夹中(路径:/ home / shradha / Downloads)。我试图上传这些文件在我的ec2 hadoop实例在hdfs / states(我已经创建了hdfs和states)。
我在某处读到只有'tmp'文件夹中的文件可以被移动,所以我将目录上传到hdfs到tmp文件夹仍然没有运气。
我尝试了,copyFromLocal,moveFromLocal,但没有任何工作。请看看屏幕截图,我相信它与hduser有关。

I'm trying to upload files in directory to a directory i made on HDFS but I'm not able to do so as ubuntu is not able to locate the files on my machine. The directory 'states'(one i'm trying to upload) contains 50 txt files, is in my download folder(path: /home/shradha/Downloads). I'm trying to upload these files in my ec2 hadoop instance in hdfs/states (i have already created hdfs and states). I read somewhere that only files in 'tmp' folder can be moved so i moved the directory i want to upload to hdfs to tmp folder still no luck. I've tries put, copyFromLocal, moveFromLocal but nothing has worked. Please take a look at the screen shot, I believe it has something to do with the hduser.

推荐答案

你得到的错误说你要复制的文件不存在。
尝试移动一个文件,看看结果如何。

The error you are getting says the files you want to copy does not exist. Try to move ONE file and see what are the result.

使用 namei -mo <文件>

use namei -mo <file> to see the user and the permissions over the file and parents folders.

IE:

[hduser@hdp-clt wordcount]$ namei -mo output/combiner/part-00000 
f: output/combiner/part-00000
 drwxr-xr-x hduser common output
 drwxr-xr-x hduser common combiner
 -rw-r--r-- hduser common part-00000

这将帮助您了解发生了什么问题。

This will help you to understand what's wrong.

这篇关于无法将目录上传到hdfs。 `/ usr / local / tmp /':没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆