Documentation ¶
Index ¶
- func EnableLogging(output bool)
- func HandleError(err error)
- func MRPrintln(format string, args ...interface{})
- func Worker(mapf func(string, string) []KeyValue, reducef func(string, []string) string)
- type Coordinator
- func (c *Coordinator) Done() bool
- func (c *Coordinator) GetTask(args *WorkerGetTaskRequest, reply *WorkerGetTaskReply) error
- func (c *Coordinator) GetWorkerId(args *WorkerRegisterRequest, reply *WorkerRegisterReply) error
- func (c *Coordinator) UpdateTaskStatus(args *WorkerUpdateTaskStatusRequest, reply *WorkerUpdateTaskStatusReply) error
- type CoordinatorReply
- type CoordinatorRequest
- type KeyValue
- type RetryableError
- type Task
- type TaskPtr
- type TaskStatus
- type TaskType
- type WorkerGetTaskReply
- type WorkerGetTaskRequest
- type WorkerRegisterReply
- type WorkerRegisterRequest
- type WorkerStatus
- type WorkerUpdateTaskStatusReply
- type WorkerUpdateTaskStatusRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableLogging ¶
func EnableLogging(output bool)
func HandleError ¶
func HandleError(err error)
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func MakeCoordinator ¶
func MakeCoordinator(files []string, nReduce int) *Coordinator
func (*Coordinator) Done ¶
func (c *Coordinator) Done() bool
Done main/mrcoordinator.go calls Done() periodically to find out if the entire job has finished.
func (*Coordinator) GetTask ¶
func (c *Coordinator) GetTask( args *WorkerGetTaskRequest, reply *WorkerGetTaskReply, ) error
func (*Coordinator) GetWorkerId ¶
func (c *Coordinator) GetWorkerId( args *WorkerRegisterRequest, reply *WorkerRegisterReply, ) error
GetWorkerId Give monotonically increasing Ids.
func (*Coordinator) UpdateTaskStatus ¶
func (c *Coordinator) UpdateTaskStatus( args *WorkerUpdateTaskStatusRequest, reply *WorkerUpdateTaskStatusReply, ) error
type CoordinatorReply ¶
type CoordinatorReply struct {
FileNames string
}
type CoordinatorRequest ¶
type WorkerRequest struct { WorkerId int Task Task }
type WorkerReply struct { Task Task }
type RetryableError ¶
type RetryableError struct {
// contains filtered or unexported fields
}
func (*RetryableError) Error ¶
func (e *RetryableError) Error() string
type Task ¶
type Task struct { Id int // M NReduce int // fix const FileLocs []string TaskType TaskType TStatus TaskStatus WorkerId int WStatus WorkerStatus ExpiryTimer *time.Timer }
type WorkerGetTaskReply ¶
type WorkerGetTaskRequest ¶
type WorkerGetTaskRequest struct {
WorkerId int
}
type WorkerRegisterReply ¶
type WorkerRegisterReply struct {
WorkerId int
}
type WorkerRegisterRequest ¶
type WorkerRegisterRequest struct{}
type WorkerUpdateTaskStatusReply ¶
type WorkerUpdateTaskStatusReply struct {
StatusUpdated bool
}
type WorkerUpdateTaskStatusRequest ¶
type WorkerUpdateTaskStatusRequest struct { WorkerId int TaskId int // M NewGeneratedFiles []string TStatus TaskStatus }
Click to show internal directories.
Click to hide internal directories.