Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. mapred = SON()
  2. mapred["mapreduce"] = "data"
  3. mapred['map']="function(){this.friends.forEach(function(z){emit( z , { count : 1 } );});};"
  4. mapred['reduce']="function( key , values ){var total = 0; for ( var i=0; i<values.length; i++ ){total += values[i].count;}return { count : total };};"
Add Comment
Please, Sign In to add comment