Not able to execute mapreduce code

–1 vote

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

Jan 7, 2019 in Big Data Hadoop by digger
• 26,740 points
692 views

1 answer to this question.

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, 2019 by Omkar
• 69,220 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 30, 2018 in Big Data Hadoop by Ashish
• 2,650 points
2,576 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
• 11,380 points
7,663 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
• 13,490 points
1,031 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
• 13,490 points
15,880 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
• 11,380 points
11,029 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
• 11,380 points
2,538 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,838 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,350 points
4,612 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
• 69,220 points
1,333 views
–1 vote
1 answer

Not able to run java mapreduce

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

answered Jan 11, 2019 in Big Data Hadoop by Omkar
• 69,220 points
1,305 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP