Пример #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),
	}
}
Пример #2
0
func newWorker(address string) *Worker {
	return &Worker{
		address:    address,
		cFS:        fs.NewLocalFS(filePath),
		mapperNum:  0,
		reducerNum: 0,
	}
}