Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/189#discussion_r11314441
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -896,7 +896,9 @@ class SparkContext(
require(p >= 0 && p < rdd.partitions.size, s"Invalid partition
requested: $p")
}
val callSite = getCallSite
- val cleanedFunc = clean(func)
+ // There's no need to check this function for serializability,
+ // since it will be run right away.
+ val cleanedFunc = clean(func, false)
--- End diff --
IMO you might as well clone it here too, because it could be modified in
other threads while the job is running.
---
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.
---