Pages

Saturday, 14 June 2014

Map Reduce Concept


Map Reduce Concept

Let us consider an example


  • Suppose we have a file with some text in it.
  • Now suppose we want to find out whether how many words are present in a particular file having a specific length.
  • Suppose we want to know the no. of words present in a file having length 6
  • We can follow the above map reduce concept and map each word to a function that calculates its length
  • Words having similar length are grouped together
  • These groups are further passed on to the reduce functions .Reduce functions can also work parallely.
  • So imagine such parallel reduce functions working together and producing the count of words having length as key which was passed to that particular function
  • Considering the above example the output of reduce functions tells us that there are 3 words whose length is 6.
  • Similarly other reduce function may output the number of words having length say 6 or 8 or any number.






No comments:

Post a Comment