MCPcopy Create free account
hub / github.com/BWbwchen/MapReduce / startMaster

Function startMaster

util.go:90–107  ·  view source on GitHub ↗
(input []string, nWorker int, nReducer int)

Source from the content-addressed store, hash-verified

88}
89
90func startMaster(input []string, nWorker int, nReducer int) {
91 inputFiles := []string{}
92 for _, s := range input {
93 f, _ := filepath.Abs(s)
94 inputFiles = append(inputFiles, f)
95 }
96
97 var wg sync.WaitGroup
98 // Start master
99 // master.StartMaster(os.Args[1:], nReducer, MasterIP)
100 wg.Add(1)
101 go func() {
102 master.StartMaster(inputFiles, nWorker, nReducer, MasterIP)
103 wg.Done()
104 }()
105
106 wg.Wait()
107}
108
109func startWorker(plugin string, id int, nReducer int, storeInRAM bool) {
110 pluginFile, _ := filepath.Abs(plugin)

Callers 2

StartMasterFunction · 0.85
singleMachineJobFunction · 0.85

Calls 1

StartMasterFunction · 0.92

Tested by

no test coverage detected