I take this paper as the official introduction to Google’s MapReduce system. Below I mean by bag an unordered ‘set’ of values, but allowing repeats of values.
They describe the function map as a function provided by the user that takes a key-value pair and returns a bag of key-values. The role of the ‘argument’ parameter to map is unclear to me. Is the map routine required to pay attention to its value? Perhaps the unstated assumption is that the ultimate purpose is to compute something that depends on a ‘bag’ of a great many pre-existing key-value pairs. I cannot imagine how the type of the bag elements bears on the logic of MapReduce. Perhaps the key of each output pair of map must be the same as the key of its argument.
The map function in their first sample code in section 2.1 indeed ignores its key argument. So far the paper has not described how to install these two functions into the hardware which must somehow determine the arguments to map. The sample implies that MapReduce does decimal arithmetic on the intermediate values. That seems bizarre.
Ah! We come to the mapreduce specification object where we learn that MapReduce assumes that map is taking its input from files.
I have seen no use of the key argument to map in any of the tutorials.