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 3, 2018 in Big Data Hadoop by Atul
• 10,240 points
131 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 3, 2018 by Ashish
• 2,630 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,290 points
68 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 11, 2018 in Big Data Hadoop by Irfan
• 120 points
29 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,280 points
429 views
0 votes
1 answer

What is the difference between Map-side join and Reduce-side join?

Join is a clause that combines the records ...READ MORE

answered Dec 13, 2018 in Big Data Hadoop by Omkar
• 67,480 points
140 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,735 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,553 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
992 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 5, 2018 in Big Data Hadoop by Ashish
• 2,630 points
1,199 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 29, 2018 in Big Data Hadoop by Ashish
• 2,630 points
428 views