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.

Input: a set of key/value pairs<br />

Programmer specifies two methods:<br />

Map(k, v) *<br />

Takes a key value pair <strong>and</strong> outputs a set of key value pairs<br />

E.g., key is the filename, value is a single line in the file<br />

There is one Map call for every (k,v) pair<br />

Reduce(k’, *) *<br />

All values v’ with same key k’ are reduced<br />

together <strong>and</strong> processed in v’ order<br />

There is one Reduce function call per unique key k’<br />

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

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

Saved successfully!

Ooh no, something went wrong!