Intermediate Topic 33 of 51 Distributed Systems & Cloud
MapReduce
Programming model splitting work into map and reduce phases.
How it works
MapReduce is a programming model and framework for processing large datasets in parallel across a cluster. A map function processes input records and emits intermediate key-value pairs; the framework shuffles and groups pairs by key; a reduce function combines the values for each key into results. The runtime handles partitioning input, scheduling tasks near their data, retrying failed tasks and stragglers with speculative execution and writing results to a distributed file system. Combiners reduce shuffle data.
Where it is used
Word counts, log analysis, web indexing, ETL, inverted index construction and large-scale joins were classic MapReduce jobs at Google and in Hadoop.
Common pitfall
Disk-based intermediate data makes iterative algorithms and interactive queries slow, which led to Spark and other engines keeping data in memory. Skewed keys create straggling reducers. Writing complex pipelines as chains of jobs is awkward, so higher-level tools such as Hive and Pig emerged. Design for associative, commutative reductions where possible.
Where it fits in the course
MapReduce is topic 33 of 51 in Distributed Systems & Cloud, rated Intermediate. It follows Distributed File Systems. The next topic is Batch vs Stream Processing.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is MapReduce?
Where do people use MapReduce?
What is the most common mistake with MapReduce?
What should I learn before this topic?
How can I practice it?
Is MapReduce hard to learn?
How long does it take to learn MapReduce?
Which topics are related to MapReduce?
What should I study after MapReduce?
Related topics
- Distributed File Systems (Distributed Systems & Cloud)
- Batch vs Stream Processing (Distributed Systems & Cloud)
- Byzantine Fault Tolerance (Distributed Systems & Cloud)
- Apache Kafka (Distributed Systems & Cloud)