Map and reduce function purpose

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

E

Expert

Verified

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

©TutorsGlobe All rights reserved 2022-2023.