Documentation ¶
Index ¶
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type ByKey
- type CompletedJob
- type ExampleArgs
- type ExampleReply
- type IntermediateDataRequest
- type IntermediateFiles
- type KeyValue
- type MapCompletion
- type MapTask
- type MapTaskData
- type MapTaskList
- type Master
- func (m *Master) Done() bool
- func (m *Master) GetIntermediateFiles(args *IntermediateDataRequest, reply *IntermediateFiles) error
- func (m *Master) GetMapTask(args *Request, reply *MapTask) error
- func (m *Master) GetReduceTask(args *Request, reply *ReduceTask) error
- func (m *Master) NotifyMapTaskCompletion(args *MapCompletion, reply *Reply) error
- func (m *Master) NotifyReduceTaskCompletion(args *ReduceCompletion, reply *Reply) error
- type NoData
- type ReduceCompletion
- type ReduceTask
- type ReduceTaskData
- type ReduceTaskList
- type Reply
- type Request
- type TimeStamp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompletedJob ¶
type CompletedJob struct { }
CompletedJob Empty struct, indicates that all tasks for job are completed
type ExampleArgs ¶
type ExampleArgs struct {
X int
}
type ExampleReply ¶
type ExampleReply struct {
Y int
}
type IntermediateDataRequest ¶
type IntermediateDataRequest struct {
TaskID int
}
IntermediateDataRequest Specifies the reduce task for which intermediate files need to be accessed
type IntermediateFiles ¶
IntermediateFiles Collection of intermediate files for a specific request task
type MapCompletion ¶
MapCompletion Completion details for map task. Meant to be sent to master
type MapTaskData ¶
MapTaskData Stores map task state and other relevant information
type MapTaskList ¶
type MapTaskList struct {
// contains filtered or unexported fields
}
MapTaskList Maintains state of the map tasks
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
Master Master server code. Holds data structures and logic for assigning and managing map, reduce tasks Its exported methods are exposed by RPC which are used by workers
func MakeMaster ¶
MakeMaster create a Master. main/mrmaster.go calls this function. nReduce is the number of reduce tasks to use.
func (*Master) Done ¶
Done main/mrmaster.go calls Done() periodically to find out if the entire job has finished.
func (*Master) GetIntermediateFiles ¶
func (m *Master) GetIntermediateFiles(args *IntermediateDataRequest, reply *IntermediateFiles) error
GetIntermediateFiles RPC handler, return files for reduce task
func (*Master) GetMapTask ¶
GetMapTask RPC handler, returns map tasks if any
func (*Master) GetReduceTask ¶
func (m *Master) GetReduceTask(args *Request, reply *ReduceTask) error
GetReduceTask RPC handler, returns reduce task if any
func (*Master) NotifyMapTaskCompletion ¶
func (m *Master) NotifyMapTaskCompletion(args *MapCompletion, reply *Reply) error
NotifyMapTaskCompletion RPC handler, updates a currently running task to be completed, and stores intermediate file path
func (*Master) NotifyReduceTaskCompletion ¶
func (m *Master) NotifyReduceTaskCompletion(args *ReduceCompletion, reply *Reply) error
NotifyReduceTaskCompletion RPC handler, updates a currently running task to completed
type ReduceCompletion ¶
type ReduceCompletion struct {
TaskID int
}
ReduceCompletion Completion details for reduce task. Meant to be sent to master
type ReduceTask ¶
ReduceTask Specifies task information for reduce operations
type ReduceTaskData ¶
ReduceTaskData Stores reduce task state and other relevant information
type ReduceTaskList ¶
type ReduceTaskList struct {
// contains filtered or unexported fields
}
ReduceTaskList Maintains state of reduce tasks