PrepAway - Latest Free Exam Questions & Answers

Which statement best describes the ordering of these values?

In a MapReduce job, the reducer receives all values associated with same key. Which statement
best describes the ordering of these values?

PrepAway - Latest Free Exam Questions & Answers

A.
The values are in sorted order.

B.
The values are arbitrarily ordered, and the ordering may vary from run to run of the same
MapReduce job.

C.
The values are arbitrary ordered, but multiple runs of the same MapReduce job will always
have the same ordering.

D.
Since the values come from mapper outputs, the reducers will receive contiguous sections of
sorted values.

Explanation:
Note:
* Input to the Reducer is the sorted output of the mappers.
* The framework calls the application’s Reduce function once for each unique key in the sorted
order.
* Example:
For the given sample input the first map emits:
< Hello, 1>
< World, 1>
< Bye, 1>
< World, 1>
The second map emits:
< Hello, 1>
< Hadoop, 1>
< Goodbye, 1>
< Hadoop, 1>

2 Comments on “Which statement best describes the ordering of these values?

  1. Henry says:

    B. Given the same MapReduce job, the inputsplit will always be the same so each of the mappers will process exactly the same data. This means that at least during the mapper sorting stage, the value tuples will be in same order. However, each run of the MapReduce job can have different finish times for each of the mappers. This means that each of the intermediate mapper data that is shuffled to the reducer can arrive in diffent orders for each run. The reducer stage sorts all the intermediate data to achive a reducer local sort of the intermediate data which can produce different orders of the value tuples.




    1



    0

Leave a Reply

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