Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Master ¶
Master 拥有 Master 需要跟踪的所有状态。
func Distributed ¶
Distributed 分布式调度在通过 RPC 向主服务器注册的工作人员上映射和减少任务。
func Sequential ¶
func Sequential(jobName string, files []string, nreduce int, mapF func(string, string) []KeyValue, reduceF func(string, []string) string, ) (mr *Master)
Sequential 依次运行 map 和 reduce 任务,等待每个任务完成后再运行下一个任务。
type Parallelism ¶
type Parallelism struct {
// contains filtered or unexported fields
}
track whether workers executed in parallel.
type Worker ¶
type Worker struct { sync.Mutex Map func(string, string) []KeyValue Reduce func(string, []string) string // contains filtered or unexported fields }
Worker holds the state for a server waiting for DoTask or Shutdown RPCs
Click to show internal directories.
Click to hide internal directories.