Briefing Cloudera Knowledge

how many key-value pairs will there be in each file?

If you run the word count MapReduce program with m mappers and r reducers, how many output
files will you get at the end of the job? And how many key-value pairs will there be in each file?
Assume k is the number of unique words in the input files.

A.
There will be r files, each with exactly k/r key-value pairs.

B.
There will be r files, each with approximately k/m key-value pairs.

C.
There will be r files, each with approximately k/r key-value pairs.

D.
There will be m files, each with exactly k/m key value pairs.

E.
There will be m files, each with approximately k/m key-value pairs.

Explanation:
Note:
*A MapReduce job withm mappers and r reducers involves up to m*r distinct copy operations,

since eachmapper may have intermediate output going to every reducer.
*In the canonical example of word counting, a key-value pair is emitted for every word found. For
example, if we had 1,000 words, then 1,000 key-value pairs will be emitted from the mappers to
the reducer(s).