Error in Hadoop Mapreduce

0 votes

I am writing my first HDFS command and getting error:

hdfs dfs -cat /home/vinay/script/input.txt
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
cat: `/home/vinay/script/input.txt': No such file or directory
Apr 19, 2018 in Big Data Hadoop by coldcode
• 2,020 points
94 views

1 answer to this question.

0 votes

The file that you are referring here is is in the local directory i.e. /home/vinay/script/input.txt

You need to pass the HDFS uri of the file, or the HDFS file system path.

First go to localhost:50070 in your browser and find the path of the file. If the file is not uploaded to HDFS, use this command to upload the file:

 hdfs dfs -put <local-filesystem-file-path> <path-on-hdfs>

Then you can use the below command to print the content of the file present in HDFS:

hdfs dfs -cat <path-on-hdfs>
answered Apr 19, 2018 by Shubham
• 13,290 points

Related Questions In Big Data Hadoop

0 votes
0 answers

Error running hadoop mapreduce in Python using Hadoop Streaming

I was trying a sample mapredyce code ...READ MORE

Apr 2, 2018 in Big Data Hadoop by nitinrawat895
• 10,670 points
105 views
0 votes
1 answer
0 votes
1 answer

Getting error in Hadoop Streaming: Type mismatch in Key from Map

In Hadoop streaming you have to customize ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by coldcode
• 2,020 points
236 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,670 points
2,723 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
13,498 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
988 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Getting error in MapReduce job.setInputFormatClass

In old Hadoop API(i.e. below Hadoop 0.20.0), ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,290 points
320 views