Not able to execute mapreduce code

0 votes

When I try to run wordcount example, I am facing problem. I have posted the image of command and error:

Jan 7 in Big Data Hadoop by digger
• 27,620 points
20 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

Follow the below steps to execute the WordCount program,

1) Write the program in eclipse
2)Create the jar file of this program and the name of the jar file is WordCount.jar
3) Upload the dataset on hdfs. 

hdfs dfs -put wordcountproblem


4) Now, we have our jar file in hdfs. So, now we will execute the hadoop jar command. 

The syntax for hadoop jar command is as below,

hadoop jar jarfilename.jar packagename.classname inputfilename outputdirectoryname 

 
For our program, we will execute the below hadoop jar command,

hadoop jar WordCount.jar co.hduser.WordCount wordcountproblem WordCountOutput3


5) Check the output with the below command,
The syntax to check the output is as below,

hdfs dfs -cat outputdirectoryname/part-r-00000


We will check the output of our program with the below command,

hdfs dfs -cat WordCountOutput3/part-r-00000
answered Jan 7 by Omkar
• 66,880 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Not able to start Job History Server in Hadoop 2.8.1

You have to start JobHistoryServer process specifically ...READ MORE

answered Mar 29, 2018 in Big Data Hadoop by Ashish
• 2,630 points
266 views
0 votes
1 answer

Not able to find HDFS directory on my system?

I guess you didn't understand it correctly dfs.datanode.data.dir, ...READ MORE

answered Apr 17, 2018 in Big Data Hadoop by nitinrawat895
• 9,310 points
118 views
0 votes
1 answer

Why am I not able to see the Hadoop daemons that are running?

I guess you are starting the services ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 12,710 points
43 views
0 votes
2 answers

Hadoop is not able to find jps command

jps is actually not a command of ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 12,710 points
1,267 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,310 points
1,820 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,310 points
150 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,002 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
646 views
0 votes
1 answer

Not able to run mapreduce job. Attempt failes error

The most common reason for this is ...READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 66,880 points
28 views
0 votes
1 answer

Not able to run java mapreduce

The error which you are getting i.e ...READ MORE

answered Jan 10 in Big Data Hadoop by Omkar
• 66,880 points
34 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.