Documentation ¶
Index ¶
- Constants
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type GetReduceCountArgs
- type GetReduceCountReply
- type JobStage
- type KeyValue
- type Master
- type ReportTaskArgs
- type ReportTaskReply
- type RequestTaskArgs
- type RequestTaskReply
- type Task
- type TaskStatus
- type TaskType
Constants ¶
View Source
const TaskInterval = 200
View Source
const TaskTimeout = 10
View Source
const TempDir = "tmp"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetReduceCountArgs ¶
type GetReduceCountArgs struct { }
example to show how to declare the arguments and reply for an RPC.
type GetReduceCountReply ¶
type GetReduceCountReply struct {
ReduceCount 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) GetReduceCount ¶
func (m *Master) GetReduceCount(args *GetReduceCountArgs, reply *GetReduceCountReply) error
GetReduceCount RPC handler.
func (*Master) ReportTaskDone ¶
func (m *Master) ReportTaskDone(args *ReportTaskArgs, reply *ReportTaskReply) error
RequestTask RPC handler.
func (*Master) RequestTask ¶
func (m *Master) RequestTask(args *RequestTaskArgs, reply *RequestTaskReply) error
RequestTask RPC handler.
type ReportTaskArgs ¶
type ReportTaskReply ¶
type ReportTaskReply struct {
CanExit bool
}
type RequestTaskArgs ¶
type RequestTaskArgs struct {
WorkerId int
}
type RequestTaskReply ¶
Click to show internal directories.
Click to hide internal directories.