Setting the Number of Map tasks and Reduce Tasks not Working

0 votes

I am trying to run a mapreduce job with a specified number of map task which I am passing as an argument. Following is the command that I am running:

hadoop jar test.jar Test /sample/input/ /sample/output \ -D mapred.map.tasks = 10

Here, I have fixed the number of map task to be 10 but, I am still able to see that the job is running with higher number of map task than what I have specified in the command. I have checked the command as well and it seems fine to me. Please tell me what I am doing wrong?

May 4, 2018 in Big Data Hadoop by Atul
• 10,240 points
1,482 views

1 answer to this question.

0 votes
The command that you are running is correct. The reason your mr job is running with higher number of map tasks because of the number of input splits. Basically, hadoop does not allow you to specify the number of map task and is governed by the number of input splits. The number that you pass using mapred.tasks.parameter just gives a suggestion to hadoop framework about the number of maps.  Hence, in any MR job regardless of the number of map task specified, a map task will always be spawned for each input split and eventually, the number of map tasks is equal to the number of input splits.
answered May 4, 2018 by Ashish
• 2,650 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to set the number of Map & Reduce tasks?

The map tasks created for a job ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,922 views
0 votes
0 answers

Number of tasks submitted and executed within the day in hadoop

Tasks Write a software application, service, daemon or ...READ MORE

Dec 12, 2018 in Big Data Hadoop by Irfan
• 120 points
822 views
0 votes
1 answer

What is the purpose of shuffling and sorting phase in the reducer in Map Reduce?

Hi@akhtar, Shuffle phase in Hadoop transfers the map output from ...READ MORE

answered Dec 20, 2020 in Big Data Hadoop by MD
• 95,460 points
7,336 views
+2 votes
1 answer

How to calculate Maximum salary of the employee with the name using the Map Reduce Technique

Please try the below code and it ...READ MORE

answered Jul 25, 2018 in Big Data Hadoop by Neha
• 6,300 points
5,647 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
+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,832 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
0 votes
1 answer

What is the use of sequence file in Hadoop?

Sequence files are binary files containing serialized ...READ MORE

answered Apr 6, 2018 in Big Data Hadoop by Ashish
• 2,650 points
9,582 views
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
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