Exemplo n.º 1
0
func NewMapReducer(file string, mapper Mapper, reducer Reducer,
	nMapper, nReducer uint32) *MapReducer {
	return &MapReducer{
		cFS:    fs.NewLocalFS(filePath),
		master: newMaster(file, mapper, reducer, nMapper, nReducer),
	}
}
Exemplo n.º 2
0
func newWorker(address string) *Worker {
	return &Worker{
		address:    address,
		cFS:        fs.NewLocalFS(filePath),
		mapperNum:  0,
		reducerNum: 0,
	}
}