当应groupByKey API中的火花编程中使用? [英] when should groupByKey API used in spark programming?
本文介绍了当应groupByKey API中的火花编程中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
GroupByKey从洗牌data.And GroupByKey功能患有可通过利用combineByKey或reduceByKey.So当应此API来使用,也可以实现?有什么用呢?
GroupByKey suffers from shuffling the data.And GroupByKey functionality can be achieved either by using combineByKey or reduceByKey.So When should this API be used ? Is there any use case ?
推荐答案
根据下面的链接,GroupByKey应尽量避免。
According to the link below, GroupByKey should be avoided.
<一个href=\"http://databricks.gitbooks.io/databricks-spark-knowledge-base/content/best_practices/$p$pfer_reducebykey_over_groupbykey.html\"相对=nofollow>避免GroupByKey
这篇关于当应groupByKey API中的火花编程中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文