shuffle的过程图
2018-07-04 14:07:12 5 举报
shuffle的过程图
作者其他创作
大纲/内容
排序,溢出
Map task1
根据key的hash值取模值为0到reduce task1
key value cat {1,1,1,1}fruit {1,1,1,1}。。。。。。
合并排序
hadoop 1spark 1linux 1pig 1cat 1fruit 1cat 1spark 1
经过reduce也就是combiner合并
mapper1cat 1 cat 1 linux 1
mapper3hadoop 1 linux 1
hadoop 1cat 1linux 1sweet 1cat 1fruit 1spark 1dog 1fruit 1
fruit 1fruit 1fruit 1fruit 1。。。
cat 1cat 1dog 1fruit 1fruit 1hadoop 1linux 1spark 1sweet 1
reduce task2
cat 1cat 1fruit 1hadoop 1linux 1pig 1spark 1spark 1
根据key的hash值取模值为0到reduce task2
分区
reduce task1
cat 1cat 1cat 1cat 1。。。。
mapper1cat 1 cat 1 spark 1spark 1
mapper2fruit 1 pig 1
mapper3fruit 1fruit 1 sweet 1
mapper2dog 1 hadoop 1spark 1
收藏
0 条评论
下一页