MapReduce & Batch Processing
7 min read.
Run a word count and a join across mappers and reducers, watch the shuffle group keys, and see a failed task retried without changing the result.
Think of it this way: Counting votes in a national election: every polling station tallies its own ballots (map), the tallies for each candidate are sent to one counting office (shuffle), and that office adds them up (reduce). If one station loses its count, it recounts its own box; nobody else starts over.
the cat sat
the dog ran
a cat ran
Count words in a file too big for one machine. It is split into 3 chunks, one per mapper.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Run a word count
Order the stages of a MapReduce word count, from raw file to output.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
- 1Drop a step here
- 2Drop a step here
- 3Drop a step here
- 4Drop a step here
- 5Drop a step here
- 6Drop a step here
Quiz
8 questionsWhat does a mapper emit?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.