有很强的理由说明为什么应该避免使用groupByKey,并且更愿意使用reduceByKey来发送优化的网络带宽。
https://databricks.gitbooks.io/databricks-spark-knowledge-base/content/best_practices/prefer_reducebykey_over_groupbykey.html
是否有任何案例是真正需要的,不能用reduceByKey解决?
发布于 2020-07-29 17:09:44
有些用例更倾向于使用groupBy。
Replace groupByKey with reduceByKey in Spark
https://stackoverflow.com/questions/63157755
相似问题