A mapper is a MapReduce worker that processes one input partition and transforms each entry into information needed for the final computation. It emits intermediate results, usually grouped later by reducers, so machines can work on separate data shards without sending the entire dataset through one orchestrator. section 13.2.2
A mapper’s role becomes concrete in a distributed clustering workflow:
- Receive a shard of the dataset together with shared configuration, such as the current list of centroids. section 13.3
- Process points independently when the computation permits it, assigning each point to a centroid or canopy. section 13.3 section 13.3.3
- Emit intermediate data keyed for reducers, which aggregate points or values belonging to the same centroid or group. section 13.2.2 section 13.3
- Optionally reduce repeated per-key output locally with a combiner before transmission, lowering bandwidth and reducer workload. section 13.2.2
Coin recognition
Suppose each input partition contains images of coins. A mapper runs coin-recognition software on its shard and emits unsorted occurrences such as “$100: 1” or “25¢: 1”; reducers then receive all occurrences for each denomination and count them. A combiner can replace many repeated entries with local counts before transmission. section 13.2.2
$100: 1 50¢: 1 $100: 1 $1: 1 25¢: 1 ...
A compact listing of mapper output makes the intermediate, per-occurrence representation visible before reduction. section 13.2.2
