GitHub user aarondav opened a pull request:
https://github.com/apache/spark/pull/1380
Add/increase severity of warning in documentation of groupBy()
groupBy()/groupByKey() is notorious for being a very convenient API that
can lead to poor performance when used incorrectly.
This PR just makes it clear that users should be cautious not to rely on
this API when they really want a different (more performant) one, such as
reduceByKey().
(Note that one source of confusion is the name; this groupBy() is not the
same as a SQL GROUP-BY, which is used for aggregation and is more similar in
nature to Spark's reduceByKey().)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aarondav/spark warning
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/1380.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1380
----
commit d0afb68327e3bcb6047a5e9632b86f1b872ffca3
Author: Aaron Davidson <[email protected]>
Date: 2014-07-12T00:01:43Z
Add/increase severity of warning in documentation of groupBy()
groupBy()/groupByKey() is notorious for being a very convenient
API that can lead to poor performance when used incorrectly.
This PR just makes it clear that users should be cautious not to
rely on this API when they really want a different (more performant)
one, such as reduceByKey().
(Note that one source of confusion is the name; this groupBy() is not
the same as a SQL GROUP-BY, which is used for aggregation and is more
similar in nature to Spark's reduceByKey().)
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---