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,010 points
71 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 12,890 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
• 9,530 points
69 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,010 points
193 views
0 votes
1 answer

Getting error in Hadoop: Output file already exist

When you executed your code earlier, you ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 12,890 points
1,005 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
• 9,530 points
1,860 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
9,270 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,260 points
672 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
• 12,890 points
254 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.