Documentation ¶
Index ¶
- Constants
- func CallExample()
- func FinishJob(job Job)
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type ByKey
- type ExampleArgs
- type ExampleReply
- type FinishReply
- type Job
- type JobDoneReply
- type JobType
- type KeyValue
- type Master
- type MasterPhase
- type TakeJobArgs
- type WorkerJob
Constants ¶
View Source
const ( MapPhase = iota ReducePhase )
Variables ¶
This section is empty.
Functions ¶
func CallExample ¶
func CallExample()
example function to show how to make an RPC call to the master.
the RPC argument and reply types are defined in rpc.go.
Types ¶
type ExampleArgs ¶
type ExampleArgs struct {
X int
}
type ExampleReply ¶
type ExampleReply struct {
Y int
}
type FinishReply ¶
type FinishReply struct {
Succeed bool
}
type JobDoneReply ¶
type JobDoneReply struct { }
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
func MakeMaster ¶
create a Master. 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) Example ¶
func (m *Master) Example(args *ExampleArgs, reply *ExampleReply) error
an example RPC handler.
the RPC argument and reply types are defined in rpc.go.
type MasterPhase ¶
type MasterPhase int
type TakeJobArgs ¶
type TakeJobArgs struct { }
Click to show internal directories.
Click to hide internal directories.