sudo -u hdfs hadoop fs -put word.txt /dezyre



0

[cloudera@localhost input]$ pwd
/home/cloudera/wordcount/input
[cloudera@localhost input]$ sudo -u hdfs hadoop fs -put /home/cloudera/wordcount/input/word.txt /dezyre
put: `/home/cloudera/wordcount/input/word.txt': No such file or directory
[cloudera@localhost input]$ ls
word.txt
[cloudera@localhost input]$ sudo -u hdfs hadoop fs -put word.txt /dezyre
put: `word.txt': No such file or directory
 


3 Answer(s)


0

Hi Ritu,

Please provide the correct path of word.txt. System is not able to find the word.txt under /home/cloudera/wordcount/input/

Please use the file browser or 'ls' command to check whether file exists or not.

$ ls /home/cloudera/wordcount/input

This command will all the files available in input directory. Please check the name of the file and correct it in your command.

Hope this helps.

Thanks.


0

Looks like I'm specifying the correct path for the word.txt file, please have a look

[cloudera@localhost ~]$ ls
datasets  dezyre     Downloads  hadoopFile.txt  Music    Pictures  Templates  wordcount
Desktop   Documents  eclipse    lib             new.txt  Public    Videos     workspace
[cloudera@localhost ~]$ cd wordcount/
[cloudera@localhost wordcount]$ ls
input
[cloudera@localhost wordcount]$ cd input/
[cloudera@localhost input]$ ls
word.txt
[cloudera@localhost input]$ pwd
/home/cloudera/wordcount/input
[cloudera@localhost input]$ sudo -u hdfs hadoop fs -put word.txt /dezyre
put: `word.txt': No such file or directory

[cloudera@localhost input]$ sudo -u hdfs hadoop fs -put /word.txt /dezyre
[cloudera@localhost input]$ sudo -u hdfs hadoop fs -put /home/cloudera/wordcount/input/word.txt /dezyre
put: `/home/cloudera/wordcount/input/word.txt': No such file or directory
[cloudera@localhost input]$ 


0

Hi Abhijeet, I missed your call since I was away from phone for a while. You can call me now.

Your Answer

Click on this code-snippet-icon icon to add code snippet.

Upload Files (Maximum image file size - 1.5 MB, other file size - 10 MB, total size - not more than 50 MB)

Email
Password