Skip to content

Commit

Permalink
Clean the closure, not the RDD
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Or committed May 2, 2015
1 parent b79aeb9 commit a4fa768
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ abstract class DStream[T: ClassTag] (
// because the DStream is reachable from the outer object here, and because
// DStreams can't be serialized with closures, we can't proactively check
// it for serializability and so we pass the optional false to SparkContext.clean
transform((r: RDD[T], t: Time) => context.sparkContext.clean(transformFunc(r), false))
val cleanedF = context.sparkContext.clean(transformFunc, false)
transform((r: RDD[T], t: Time) => cleanedF(r))
}

/**
Expand Down

0 comments on commit a4fa768

Please sign in to comment.