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.

Case 1:<br />

File too large for memory, but all <br />

pairs fit in memory<br />

Case 2:<br />

Count occurrences of words:<br />

words(doc.txt) | sort | uniq -c<br />

where words takes a file <strong>and</strong> outputs the words in it,<br />

one per a line<br />

Captures the essence of <strong>MapReduce</strong><br />

Great thing is it is naturally parallelizable<br />

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

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

Saved successfully!

Ooh no, something went wrong!