Is there any way to write map only Hadoop jobs

0 votes

I'm a newbie to Hadoop and I've just started learning Hadoop MapReduce programming. I faced a problem here, at times I only need a map only job because I need map result as the output. So, reduce phase is not required. Can anyone tell me how can I run a map only job in Hadoop?

Thanks in advance!

Apr 16, 2018 in Big Data Hadoop by Shubham
• 13,490 points
657 views

1 answer to this question.

0 votes

You can easily set the number of 'reducers' just by changing few parameters in your program.

One way to achieve this is by updating the driver program and set the setNumReduceTasks to the desired value on the job object.

job.setNumReduceTasks(0);

Alternatively, you can set below property as a command line parameter by using -D option

-D mapred.reduce.tasks=0
 

For example you can use it like as mentioned in the below command: 

hadoop jar hadoop-mapreduce-examples.jar wordcount /InputDir /OutputDir

answered Apr 16, 2018 by nitinrawat895
• 11,380 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Is there any way to access Hadoop web UI in linux?

In this case what you can do ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
3,519 views
0 votes
1 answer

Is there any way to include a python package with Hadoop streaming job?

See I don't know the answer to ...READ MORE

answered May 10, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
1,964 views
0 votes
1 answer

Is there any way to pull data from Mainframe to Hadoop?

First of all, COBOL is a programming ...READ MORE

answered May 21, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
2,340 views
0 votes
1 answer

Is there any way to setup Hadoop nodes (data nodes/namenodes) to use multiple volumes/disks?

Datanodes can store blocks in multiple directories ...READ MORE

answered Jun 20, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
760 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,390 points
4,234 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
10,523 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
103,822 views
0 votes
1 answer
0 votes
1 answer

Is there any way to increase Java Heap size in Hadoop?

You can add some more memory by ...READ MORE

answered Apr 12, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
4,509 views
0 votes
9 answers

Is there any way to check which Hadoop daemons are running?

use jps command, It will show all the running ...READ MORE

answered Dec 27, 2018 in Big Data Hadoop by Rakesh
• 160 points
45,184 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