Feng Jiang wrote:
look at the code:
job.setNumReduceTasks(1); // force a single reduce task
why? Is there any difficulty there to allow multiple reduce tasks?
There is not a strong reason why a single reduce task is required. This
code attempts to implement things as simply as possible, so that folks
can test their map and reduce functions.
Other changes would be required besides that one line. In particular,
one would need to change the number of splits, from:
splits = job.getInputFormat().getSplits(fs, job, 1);
to something like:
splits = job.getInputFormat().getSplits(fs, job, numReduceTasks);
then change the reduce code to loop, etc.
Doug