Skip to content

Commit 26c7aba

Browse files
author
Andrew Or
committed
Revert "In sc.runJob, actually clean the inner closure"
This reverts commit 3998168.
1 parent 6f75784 commit 26c7aba

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -1627,10 +1627,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
16271627
partitions: Seq[Int],
16281628
allowLocal: Boolean
16291629
): Array[U] = {
1630-
// We must clean `func` here before using it in another closure below
1631-
// Otherwise, the closure cleaner will only clean the outer closure but not `func`
1632-
val cleanedFunc = clean(func)
1633-
runJob(rdd, (ctx: TaskContext, iter: Iterator[T]) => cleanedFunc(iter), partitions, allowLocal)
1630+
runJob(rdd, (context: TaskContext, iter: Iterator[T]) => func(iter), partitions, allowLocal)
16341631
}
16351632

16361633
/**

0 commit comments

Comments
 (0)