package
0.0.0-20240127131847-419a547088e1
Repository: https://github.com/yizhezhang-ervin/backend_golang.git
Documentation: pkg.go.dev

# Functions

Part 2-1:启动master create a Master.
Part2-6:worker任务完成后通知master.
Part2-3:启动worker main/mrworker.go calls this function.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
Map functions return a slice of KeyValue.
Part1-3:此外Master存储Map任务产生的R个中间文件的信息.
Part1-2: Master存储这些Task的信息。与论文不同的是,这里我并没有保留worked的ID,因此master不会主动向worker发送心跳检测.
Part1-4:Map和Reduce的Task应该负责不同的事情,但是在实现代码的过程中发现同一个Task结构完全可以兼顾两个阶段的任务.

# Type aliases

for sorting by key.
Part1-1:每个(Map或者Reduce)Task有分为idle, in-progress, completed 三种状态.
Part1-5:此外我将task和master的状态合并成一个State。task和master的状态应该一致。如果在Reduce阶段收到了迟来MapTask结果,应该直接丢弃。.