MapReduce

Google has lots of data, and a cluster of heterogeneous machines they need to process it on. Most computation can be expressed as a map and reduce operation. MapReduce is a programming model that allows for distributed processing of large data sets across clusters of computers using a simple programming model, transparent parallelisation and fault tolerance.

1. Dataflow

Data is stored as a bag of key-value pairs. Two functions:

Tasks are scheduled across cluster nodes (locality aware scheduling), and intermediate results are persisted in GFS.

If a task fails, it is restarted. If a node fails, the tasks running on it are restarted on a different node.

2. Speculative Execution

Jobs are dominated by the slowest task. MapReduce attempts to locate slow tasks (stragglers) and run redundant speculative tasks.

Hadoop finds stragglers by monitoring each tasks progress score. If progress score and task ran for at least minute, mark straggler.

Back to Home