Documentation ¶
Index ¶
Constants ¶
View Source
const ( MapTask taskType = "MAP" ReduceTask = "REDUCE" ExitTask = "EXIT" )
View Source
const ( TO_BE_PROCESSED = iota PROCESSING PROCESSED )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MRTaskReply ¶
type MRTaskUpdate ¶
type Master ¶
type Master struct { MapTasks map[int]Task ReduceTasks map[int]Task NMapTasks int NReduce int HasFinishedJob bool Mu sync.Mutex // the master has a Mutex instance because we want one mutex to share amongst workers, and not a different instance each time a function is called }
func MakeMaster ¶
create a Master. Type: constructor main/mrmaster.go calls this function. nReduce is the number of reduce tasks to use.
func (*Master) Done ¶
main/mrmaster.go calls Done() periodically to find out if the entire job has finished.
func (*Master) RequestTask ¶
func (m *Master) RequestTask(args *MRTaskArgs, reply *MRTaskReply) (err error)
func (*Master) UpdateMapTask ¶
func (m *Master) UpdateMapTask(args *MRTaskUpdate, reply *MRTaskUpdate) error
func (*Master) UpdateReduceTask ¶
func (m *Master) UpdateReduceTask(args *MRTaskUpdate, reply *MRTaskUpdate) error
Click to show internal directories.
Click to hide internal directories.