Unable to upload directory to hdfs. `/usr/local/tm

2019-09-12 10:09发布

问题:

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.

回答1:

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.

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

I.E:

[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.