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,640 points
39 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 by Omkar
• 67,460 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
427 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
• 10,670 points
231 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,290 points
67 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,290 points
1,807 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,695 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
• 10,670 points
284 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,408 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
983 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
• 67,460 points
41 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
• 67,460 points
46 views