How to run MapReduce program

0 votes
Hi. I have chosen the Hadoop course from Edureka. I have got the VM for practice. I want to run MapReduce programs and need eclipse for that. Can you please tell me how to install it and the steps to run MapReduce program?
Feb 22, 2019 in Big Data Hadoop by Shashi

edited Feb 22, 2019 1,171 views

1 answer to this question.

0 votes

Eclipse is already installed in the Edureka VM. When you start the VM, you will be able to see Eclipse on the Desktop. Double click on it to launch it. 

Here are the steps:

1) Write the program in eclipse. imageIn this program, the package name is co.edureka and the class name is WordCount.

2)Create the jar file of this program and the name of the jar file is WordCount.jar and then uploaded it to FTP on My Lab​

3) Upload the dataset on hdfs. We can do this by first uploading the dataset on FTP and then transferring it to hdfs.

Upload the dataset on FTP:
Transfer it to hdfs by the below command:​

hdfs dfs -put wordcountproblem

4) Now, we have our jar file in FTP (local file system) and our dataset 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.edureka.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 Feb 22, 2019 by Suman

Related Questions In Big Data Hadoop

0 votes
1 answer

How to run mapreduce program in terminal?

You can reference the below steps: Step 1: ...READ MORE

answered Jan 31, 2019 in Big Data Hadoop by Srishti
8,192 views
0 votes
1 answer

How to call MapReduce program using a simple Java Program?

Because map and reduce run on different ...READ MORE

answered Sep 4, 2019 in Big Data Hadoop by ravikiran
• 4,620 points
603 views
0 votes
1 answer

How to run example codes of Hadoop Definitive Guide book?

You will find multiple git repositories where ...READ MORE

answered Mar 21, 2018 in Big Data Hadoop by Shubham
• 13,490 points
554 views
0 votes
7 answers

How to run a jar file in hadoop?

I used this command to run my ...READ MORE

answered Dec 10, 2018 in Big Data Hadoop by Dasinto
18,934 views
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,000 views
0 votes
1 answer

Hadoop giving java.io.IOException, in mkdir Java code.

I am not sure about the issue. ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,591 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
8,644 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
1,525 views
0 votes
1 answer

How to run Map Reduce program using Ubuntu terminal?

 I used the following steps to execute it ...READ MORE

answered Aug 7, 2018 in Big Data Hadoop by Neha
• 6,300 points
1,959 views
0 votes
1 answer

How to run Hadoop in Docker containers?

Hi, You can run Hadoop in Docker container. Follow ...READ MORE

answered Jan 24, 2020 in Big Data Hadoop by MD
• 95,340 points
871 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP