GitHub user zsxwing opened a pull request:
https://github.com/apache/spark/pull/3671
[SPARK-4824][Core] Add 'iterator' to reduce memory consumed by join
In Scala, `map` and `flatMap` of `Iterable` will copy the contents of
`Iterable` to a new `Seq`. Such as,
```Scala
val iterable = Seq(1, 2, 3).map(v => {
println(v)
v
})
println("Iterable map done")
val iterator = Seq(1, 2, 3).iterator.map(v => {
println(v)
v
})
println("Iterator map done")
```
outputed
```
1
2
3
Iterable map done
Iterator map done
```
So we should use 'iterator' to reduce memory consumed by join.
Found by Johannes Simon in
http://mail-archives.apache.org/mod_mbox/spark-user/201412.mbox/%3C5BE70814-9D03-4F61-AE2C-0D63F2DE4446%40mail.de%3E
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zsxwing/spark SPARK-4824
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/3671.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 #3671
----
commit 95d59d697a7f2fabd877dac864e9dff8d1011d5a
Author: zsxwing <[email protected]>
Date: 2014-12-11T02:42:02Z
Add 'iterator' to reduce memory consumed by join
----
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]