Documentation
¶
Index ¶
- func PrintLog(msg string)
- func PrintLog2(msg string)
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type ByKey
- type ExampleArgs
- type ExampleReply
- type KeyValue
- type Master
- func (m *Master) Done() bool
- func (m *Master) Example(args *ExampleArgs, reply *ExampleReply) error
- func (m *Master) NextSerial() int
- func (m *Master) WorkerFinish(args *WorkerReportArgs, reply *WorkerReportReply) error
- func (m *Master) WorkerRegister(args *WorkerAskArgs, reply *WorkerAskReply) error
- type SerialLog
- type WorkerAskArgs
- type WorkerAskReply
- type WorkerReportArgs
- type WorkerReportReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExampleArgs ¶
type ExampleArgs struct {
X int
}
type ExampleReply ¶
type ExampleReply struct {
Y int
}
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.
func (*Master) NextSerial ¶
func (*Master) WorkerFinish ¶
func (m *Master) WorkerFinish(args *WorkerReportArgs, reply *WorkerReportReply) error
func (*Master) WorkerRegister ¶
func (m *Master) WorkerRegister(args *WorkerAskArgs, reply *WorkerAskReply) error
type WorkerAskArgs ¶
type WorkerAskArgs struct {
Name string
}
Add your RPC definitions here. # Worker ask for task
type WorkerAskReply ¶
type WorkerReportArgs ¶
type WorkerReportArgs struct { Success bool TaskType string Serial int FilePaths []string // mapper MapperNo int // reducer ReducerNo int }
Worker finish work ¶
type WorkerReportReply ¶
type WorkerReportReply struct { }
Click to show internal directories.
Click to hide internal directories.