Assume a hadoop cluster with 3 slave nodes and one master node with a replication factor of 2. Further assume a file F is split into 3 blocks A, B, and C and they are stored as follows: Slave 1: A, B Slave 2: A, C Slave 3: B, C
In addition, assume you kick of a map reduce job to count the number of words in F and that each block is split 3 times.
My question is how are mappers distributed so that they are optimized for maximum productivity? One possibility: Slave 1: 3 mappers to work on A Slave 2: 3 mappers to work on C Slave 3: 3 mappers to work on B
But how does hadoop avoid the following? Slave 1: 6 mappers (3 on A, 3 on B) Slave 2: idle Slave 3: 3 mappers on C