其他分享
首页 > 其他分享> > spark:reducebykey与groupbykey的区别

spark:reducebykey与groupbykey的区别

作者:互联网

从源码看:

reduceBykey与groupbykey:

都调用函数combineByKeyWithClassTag[V]((v: V) => v, func, func, partitioner)
reduceBykey的map端进行聚合combine操作
mapSideCombine = true

groupbykey的mapSideCombine = false

 

标签:reduceBykey,groupbykey,调用函数,mapSideCombine,reducebykey,源码,func,spark
来源: https://www.cnblogs.com/hejunhong/p/12906105.html