Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make proactive serializability checking optional.
SparkContext.clean uses ClosureCleaner's proactive serializability
checking by default.  This commit adds a parameter to the clean method
of SparkContext that allows clients to specify that serializability
checking should not occur as part of closure cleaning.
  • Loading branch information
willb committed Jun 18, 2014
commit abe816b726c8647caa5c8ebcc5047189eb2dd32d
4 changes: 2 additions & 2 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,8 @@ class SparkContext(config: SparkConf) extends Logging {
* Clean a closure to make it ready to serialized and send to tasks
* (removes unreferenced variables in $outer's, updates REPL variables)
*/
private[spark] def clean[F <: AnyRef](f: F): F = {
ClosureCleaner.clean(f)
private[spark] def clean[F <: AnyRef](f: F, checkSerializable: Boolean = true): F = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you document checkSerializable in the doc? (like what exception does it throw)

ClosureCleaner.clean(f, checkSerializable)
f
}

Expand Down