reduceByKey,aggregatedByKey都是基于combineByKey。groupByKey没有mapside combine。
aggregateByKey和combineByKey区别:aggregateByKey直接可以创建zeroValue,而不用根据v初始化combiner,当mergevalue和createCombiner操作相同时,优先使用aggregateByKey
1.CombineByKey
源码
2.aggregatedByKey
源码
3.reduceByKey
源码