PrepAway - Latest Free Exam Questions & Answers

What happens in a MapReduce job when you set the number of reducers to one?

What happens in a MapReduce job when you set the number of reducers to one?

PrepAway - Latest Free Exam Questions & Answers

A.
A single reducer gathers and processes all the output from all the mappers. The output is
written in as many separate files as there are mappers.

B.
A single reducer gathers and processes all the output from all the mappers. The output is
written to a single file in HDFS.

C.
Setting the number of reducers to one creates a processing bottleneck, and since the number
of reducers as specified by the programmer is used as a reference value only, the MapReduce
runtime provides a default setting for the number of reducers.

D.
Setting the number of reducers to one is invalid, and an exception is thrown.

Explanation:
*It is legal to set the number of reduce-tasks to zero if no reduction is desired.
In this case the outputs of the map-tasks go directly to the FileSystem, into the output path set
bysetOutputPath(Path). The framework does not sort the map-outputs before writing them out to
the FileSystem.
*Often, you may want to process input data using a map function only. To do this, simply set
mapreduce.job.reduces to zero. The MapReduce framework will not create any reducer tasks.
Rather, the outputs of the mapper tasks will be the final output of the job.

6 Comments on “What happens in a MapReduce job when you set the number of reducers to one?

  1. Ramesh Hiremath says:

    B.
    A single reducer gathers and processes all the output from all the mappers. The output is
    written to a single file in HDFS.




    0



    0

Leave a Reply to yogeswaran Cancel reply

Your email address will not be published. Required fields are marked *