map、shuffle、reduce包含的流程如下:

map:split->map->buffer in memory

partition:partition/sort/spill

shuffle:copy->sort->merge

reduce:shuffle result->reduce->output

map-reduce流程图

partition与shuffle区别:

partition 是指把同一个map中的数据分给不同的reduce

shuffle是指在分区过程中把相同的key分到同一个reduce

sort与combine次数:

map端两次sort;reduce端一次sort;每次sort都可以用combine优化。

相关文章: