-
- Downloads
[SPARK-14558][CORE] In ClosureCleaner, clean the outer pointer if it's a REPL line object
## What changes were proposed in this pull request? When we clean a closure, if its outermost parent is not a closure, we won't clone and clean it as cloning user's objects is dangerous. However, if it's a REPL line object, which may carry a lot of unnecessary references(like hadoop conf, spark conf, etc.), we should clean it as it's not a user object. This PR improves the check for user's objects to exclude REPL line object. ## How was this patch tested? existing tests. Author: Wenchen Fan <wenchen@databricks.com> Closes #12327 from cloud-fan/closure.
Showing
- core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala 23 additions, 30 deletions...src/main/scala/org/apache/spark/util/ClosureCleaner.scala
- repl/scala-2.11/src/test/scala/org/apache/spark/repl/ReplSuite.scala 27 additions, 0 deletions...2.11/src/test/scala/org/apache/spark/repl/ReplSuite.scala
Please register or sign in to comment