Skip to content
Snippets Groups Projects
Commit 63e1999f authored by Reynold Xin's avatar Reynold Xin
Browse files

Merge pull request #606 from markhamstra/foreachPartition_fix

Actually use the cleaned closure in foreachPartition
parents 012c9e5a 6e6b3e0d
No related branches found
No related tags found
No related merge requests found
......@@ -489,7 +489,7 @@ abstract class RDD[T: ClassManifest](
*/
def foreachPartition(f: Iterator[T] => Unit) {
val cleanF = sc.clean(f)
sc.runJob(this, (iter: Iterator[T]) => f(iter))
sc.runJob(this, (iter: Iterator[T]) => cleanF(iter))
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment