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,670 points
100 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,030 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,650 points
948 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,950 points
1,600 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,450 points
161 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,450 points
4,859 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,950 points
5,861 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,950 points
874 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
36,900 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,320 points
2,193 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,030 points
231 views
–1 vote
1 answer

Not able to run java mapreduce

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

answered Jan 10, 2019 in Big Data Hadoop by Omkar
• 69,030 points
162 views