Map Function - Correct Answer- Takes an input pair and produces a set of intermediate
key/value pairs
MapReduce library - Correct Answer- Groups together all intermediate values associated with
the same intermediate key and passes them to the Reduce function
Reduce function - Correct Answer- Accepts an intermediate key and a list of values for that
key.
Merges together these values to form a possibly smaller set of values.
Map and reduce have related types - Correct Answer- map (k1, v1) → list(k2, v2)
reduce (k2, list(v2)) → list(v2)
MR output is smaller - Correct Answer- computing summary statistics
,MR output is larger - Correct Answer- computing some kind of data structure for downstream
use
Output value produced per reduce invocation - Correct Answer- Zero or one
Execution Pipeline - Correct Answer- Stage 1, partition input data and run map() on many
machines
Then group intermediate data by intermediate key
Stage 2, partition intermediate data by key and run reduce() on many machines
What can be a MapReduce program? - Correct Answer- - URL counting in logs
, - Inverted index construction for search engines, Sorting
- Massive image conversion, others
How do we know if a machine goes down? - Correct Answer- Heartbeat messages tell master
which machines are online
Map Worker Dies - Correct Answer- - Just restart that task on a different box
- You lose the map() work, but no big deal
Reduce Worker Dies - Correct Answer- - Restart the reducer, using output from source
mappers
Relational database management system (RDBMS) machine dies - Correct Answer- Query is
restarted
What about slow, not dead, machines? - Correct Answer- - Speculative execution for
stragglers
- Kill the 2nd-place finisher
What about data placement? - Correct Answer- Use GFS across cluster disks; start tasks
where the target data already lies
Isn't the intermediate data size large? - Correct Answer- - Use a local reducer called a
Combiner at each map
- Compress data between map and reduce
Mapper and Reducer are... - Correct Answer- Stateless - no side effects
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller MGRADES. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $10.49. You're not tied to anything after your purchase.