| 12 | ) |
| 13 | |
| 14 | type Master struct { |
| 15 | Workers []WorkerInfo |
| 16 | MapTasks []MapTaskInfo |
| 17 | ReduceTasks []ReduceTaskInfo |
| 18 | numWorkers int |
| 19 | totalWorkers int |
| 20 | numReducer int |
| 21 | enoughWorker chan bool |
| 22 | crashChan chan string |
| 23 | mux sync.Mutex |
| 24 | rpc.UnimplementedMasterServer |
| 25 | } |
| 26 | |
| 27 | func NewMaster(nWorker int, nReduce int) rpc.MasterServer { |
| 28 | return &Master{ |
nothing calls this directly
no outgoing calls
no test coverage detected