The original description of the getNumMapTasks() method in JobConf was invalid, because it referenced to the number of reducer tasks instead of the map tasks.
from: Get configured the number of reduce tasks for this job.
to: Get the configured number of map tasks for this job.
It was maybe the result of a tricky copy-paste
Github PR: https://github.com/apache/hadoop/pull/205