Documentation
¶
Index ¶
Constants ¶
View Source
const ( TASK_IDLE int = iota TASK_INPROGRESS TASK_COMPLETED )
View Source
const ( WORKER_IDLE int = iota WORKER_BUSY WORKER_UNKNOWN )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MapTaskInfo ¶
type Master ¶
type Master struct {
Workers []WorkerInfo
MapTasks []MapTaskInfo
ReduceTasks []ReduceTaskInfo
rpc.UnimplementedMasterServer
// contains filtered or unexported fields
}
func (*Master) PeriodicHealthCheck ¶
func (ms *Master) PeriodicHealthCheck()
func (*Master) UpdateIMDInfo ¶
func (*Master) WorkerRegister ¶
func (ms *Master) WorkerRegister(ctx context.Context, in *rpc.WorkerInfo) (*rpc.RegisterResult, error)
type ReduceTaskInfo ¶
func (*ReduceTaskInfo) SetState ¶
func (mt *ReduceTaskInfo) SetState(state int)
type WorkerInfo ¶
type WorkerInfo struct {
UUID string
IP string
WorkerState int
// contains filtered or unexported fields
}
func (*WorkerInfo) Broken ¶
func (w *WorkerInfo) Broken() bool
func (*WorkerInfo) Health ¶
func (w *WorkerInfo) Health() bool
func (*WorkerInfo) SetState ¶
func (w *WorkerInfo) SetState(state int)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.