Documentation ¶
Index ¶
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type KVArray
- type KeyValue
- type Master
- func (m *Master) AssignMapTask(args *RequestArgs, reply *ReplyArgs) error
- func (m *Master) AssignReduceTask(args *RequestArgs, reply *ReplyArgs) error
- func (m *Master) Done() bool
- func (m *Master) ReceiveMapFinish(args *RequestArgs, reply *ReplyArgs) error
- func (m *Master) ReceiveReduceFinish(args *RequestArgs, reply *ReplyArgs) error
- type ReplyArgs
- type RequestArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
func MakeMaster ¶
create a Master and called by main/mrmaster.go
func (*Master) AssignMapTask ¶
func (m *Master) AssignMapTask(args *RequestArgs, reply *ReplyArgs) error
assign map task to worker
func (*Master) AssignReduceTask ¶
func (m *Master) AssignReduceTask(args *RequestArgs, reply *ReplyArgs) error
assign reduce task toi worker
func (*Master) Done ¶
main/mrmaster.go calls Done() periodically to find out if the entire job has finished.
func (*Master) ReceiveMapFinish ¶
func (m *Master) ReceiveMapFinish(args *RequestArgs, reply *ReplyArgs) error
recevie map task finish from worker
func (*Master) ReceiveReduceFinish ¶
func (m *Master) ReceiveReduceFinish(args *RequestArgs, reply *ReplyArgs) error
recevie reduce task finish from worker
type RequestArgs ¶
type RequestArgs struct {
TaskNo int // task number of map and reduce
}
Click to show internal directories.
Click to hide internal directories.