function it is natural to write , since every output pair is referring to the contacts of one single person. The MapReduce system would line up the 1100 Map processors, and would provide each with its corresponding 1 million input records. The Map step would produce 1.1 billion records, with values ranging between, say, 8 and 103. The MapReduce System would then line up the 96 Reduce processors by performing shuffling operation of the key/value pairs due to the fact that we need average per age, and provide each with its millions of corresponding input records. The Reduce step would result in the much reduced set of only 96 output records , which would be put in the final result file, sorted by . The count info in the record is important if the processing is reduced more than one time. If we did not add the count of the records, the computed average would be wrong, for example: -- map output #1: age, quantity of contacts 10, 9 10, 9 10, 9 -- map output #2: age, quantity of contacts 10, 9 10, 9 -- map output #3: age, quantity of contacts 10, 10 If we reduce files and , we will have a new file with an average of 9 contacts for a 10-year-old person ((9+9+9+9+9)/5): -- reduce step #1: age, average of contacts 10, 9 If we reduce it with file , we lose the count of how many records we've already seen, so we end up with an average of 9.5 contacts for a 10-year-old person ((9+10)/2), which is wrong. The correct answer is 9.166 = 55 / 6 = (9×3+9×2+10×1)/(3+2+1). Dataflow Software framework architecture adheres to open-closed principle where code is effectively divided into unmodifiable frozen spots and extensible hot spots. The frozen spot of the MapReduce framework is a large distributed sort. The hot spots, which the application defines, are: an input reader a Map function a partition function a compare function a Reduce function an output writer Input reader The input reader divides the input into appropriate size 'splits' (in practice, typically, 64 MB to 128 MB) and the framework assigns one split to each Map function. The input reader reads data from stable storage (typically, a distributed file system) and generates key/value pairs. A common example will read a directory full of text files and return each line as a record. Map