reduce,aggregate和groupBy

云计算 waitig 517℃ 百度已收录 0评论

官网说明:

groupBy:
This operation may be very expensive. If you are grouping in order to perform an
aggregation (such as a sum or average) over each key, using `PairRDDFunctions.aggregateByKey`
or `PairRDDFunctions.reduceByKey` will provide much better performance.
尽量用 reduce或者 aggregate代替groupBy操作


本文由【waitig】发表在等英博客
本文固定链接:reduce,aggregate和groupBy
欢迎关注本站官方公众号,每日都有干货分享!
等英博客官方公众号
点赞 (0)分享 (0)