Documentation ¶
Index ¶
- Constants
- func CallExample()
- func CallMapperDone(req MapperRequest)
- func CallReducerDone(req ReducerRequest)
- func CallRequestTask() (string, int, string)
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type ByKey
- type ExampleArgs
- type ExampleReply
- type KeyValue
- type MapperRequest
- type Master
- func (m *Master) Done() bool
- func (m *Master) Example(args *ExampleArgs, reply *ExampleReply) error
- func (m *Master) MapperDone(req *MapperRequest, reply *MrEmpty) error
- func (m *Master) ReducerDone(req *ReducerRequest, reply *MrEmpty) error
- func (m *Master) RequestTask(req MrRequest, reply *MrReply) error
- type MrEmpty
- type MrReply
- type MrRequest
- type ReducerRequest
Constants ¶
View Source
const ( MAPPER_NOT_STARTED = 0 MAPPER_IN_PROGRESS = 1 MAPPER_DONE = 2 REDUCER_NOT_STARTED = 3 REDUCER_IN_PROGRESS = 4 REDUCER_DONE = 5 MAPPER_WORK = "Mapper" REDUCE_WORK = "Reducer" TIME_OUT_MAPPER = 10 TIME_OUT_REDUCER = 10 )
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.
func CallMapperDone ¶
func CallMapperDone(req MapperRequest)
func CallReducerDone ¶
func CallReducerDone(req ReducerRequest)
func CallRequestTask ¶
Types ¶
type MapperRequest ¶
MapperRequest is...
type Master ¶
type Master struct { ReducerFileState map[string]int InvalidMapperWorker map[int]int InvalidReduceWorker map[int]int // contains filtered or unexported fields }
func MakeMaster ¶
create a Master. main/mrmaster.go calls this function.
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
func (*Master) MapperDone ¶
func (m *Master) MapperDone(req *MapperRequest, reply *MrEmpty) error
func (*Master) ReducerDone ¶
func (m *Master) ReducerDone(req *ReducerRequest, reply *MrEmpty) error
type ReducerRequest ¶
ReducerRequest is ...
Click to show internal directories.
Click to hide internal directories.