19.08.2013 Views

Introduction and MapReduce - SNAP - Stanford University

Introduction and MapReduce - SNAP - Stanford University

Introduction and MapReduce - SNAP - Stanford University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Often a map task will produce many pairs of<br />

the form (k,v 1), (k,v 2), … for the same key k<br />

E.g., popular words in the Word Count example<br />

Can save network time by<br />

pre-aggregating values at<br />

the mapper:<br />

combine(k, list(v 1)) v 2<br />

Combiner is usually same<br />

as the reduce function<br />

Works only if reduce<br />

function is commutative <strong>and</strong> associative<br />

1/8/2012 Jure Leskovec, <strong>Stanford</strong> CS246: Mining Massive Datasets, http://cs246.stanford.edu 50

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!