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,050 points
164 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,380 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Error running hadoop mapreduce in Python using Hadoop Streaming

Hi As you write mapper and reducer program  ...READ MORE

answered Jan 21 in Big Data Hadoop by anonymous
318 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,050 points
346 views
+1 vote
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,870 points
4,619 views
+1 vote
11 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
26,271 views
–1 vote
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,310 points
1,729 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,380 points
539 views