Reputation: 524
If i have specified the value of parameter mapred.tasktracker.reduce.tasks.maximum in mapred-site.xml to be 2 and if the code of the program specified the reduce task to be as job.setNumReduceTasks(1), then will the parameter specified in mapred-site.xml be ignored or will it obeyed and the 2 reduce tasks will be executed simultaneously.
Upvotes: 0
Views: 228
Reputation: 20836
You are mixed up by mapred.reduce.tasks
and mapred.tasktracker.reduce.tasks.maximum
. Actually, job.setNumReduceTasks(1)
will set mapred.reduce.tasks
to 1. And mapred.tasktracker.reduce.tasks.maximum
is the maximum number of reduce tasks that will be run simultaneously by a task tracker. These are two totally different parameters.
What's more, the value of mapred.tasktracker.reduce.tasks.maximum
in mapred-site.xml
is the only effective value. You can not change it as the task tracker uses it when it is starting. mapred.reduce.tasks
is a property for one Job. Different Jobs can have differerent mapred.reduce.tasks
values.
Upvotes: 1