-
Notifications
You must be signed in to change notification settings - Fork 28.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-4672][Core]Checkpoint() should clear f to shorten the serialization chain #3545
Conversation
Can one of the admins verify this patch? |
cc @tdas can you take a look at this? |
I talked to @tdas and this is fine, but even with this, we should figure out why f is capturing its outer this way and remove that since it is expensive for serialization. cc @ankurdave |
ok to test |
Test build #24064 has started for PR 3545 at commit
|
Test build #24064 has finished for PR 3545 at commit
|
Test PASSed. |
Maybe we can try something like:
|
I write a simple example as follows to show how the abnormal The
The serialization chain of |
I believe ClosureCleaner.clean() is defined to deal with exactly this issue: scala may capture the entire class in closure, even if only one member variable is used. |
…ation chain The related JIRA is https://issues.apache.org/jira/browse/SPARK-4672 The f closure of `PartitionsRDD(ZippedPartitionsRDD2)` contains a `$outer` that references EdgeRDD/VertexRDD, which causes task's serialization chain become very long in iterative GraphX applications. As a result, StackOverflow error will occur. If we set "f = null" in `clearDependencies()`, checkpoint() can cut off the long serialization chain. More details and explanation can be found in the JIRA. Author: JerryLead <[email protected]> Author: Lijie Xu <[email protected]> Closes #3545 from JerryLead/my_core and squashes the following commits: f7faea5 [JerryLead] checkpoint() should clear the f to avoid StackOverflow error c0169da [JerryLead] Merge branch 'master' of https://github.com/apache/spark 52799e3 [Lijie Xu] Merge pull request #1 from apache/master (cherry picked from commit 77be8b9) Signed-off-by: Ankur Dave <[email protected]>
The related JIRA is https://issues.apache.org/jira/browse/SPARK-4672
The f closure of
PartitionsRDD(ZippedPartitionsRDD2)
contains a$outer
that references EdgeRDD/VertexRDD, which causes task's serialization chain become very long in iterative GraphX applications. As a result, StackOverflow error will occur. If we set "f = null" inclearDependencies()
, checkpoint() can cut off the long serialization chain. More details and explanation can be found in the JIRA.