Map and reduce function purpose

Name the map and reduce function purpose with the help of two examples.




a) Distributed grep: A line is emitted by map function if it matches the pattern. The reduce function refers to an identity function which copies the supplied intermediate data for output.

b) Term-vector per host: In this the map function emits a hostname, vector pair for each document (input). The reduce function adds all term vectors pairs produced and discards any infrequent terms.

   Related Questions in Computer Engineering

2015 ┬ęTutorsGlobe All rights reserved. TutorsGlobe Rated 4.8/5 based on 34139 reviews.