From 36feb6cbd3c8834c8ac0c1fcfc60a1f63169001f Mon Sep 17 00:00:00 2001 From: tedyu Date: Thu, 7 May 2015 21:21:19 -0700 Subject: [PATCH] Try to get correct syntax --- .../scala/org/apache/spark/util/ClosureCleanerSuite.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala b/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala index 3fac11d03b143..4e1cc08fdb59b 100644 --- a/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala +++ b/core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala @@ -267,19 +267,19 @@ private object TestUserClosuresActuallyCleaned { } def testFlatMapWith(rdd: RDD[Int]): Unit = { import java.util.Random - rdd.flatMapWith ((index: Int) => new Random(index + 42)){ _ => return; Seq() }.count() + rdd.flatMapWith ((index: Int) => new Random(index + 42)){ (_, it) => return; Seq() }.count() } def testMapWith(rdd: RDD[Int]): Unit = { import java.util.Random - rdd.mapWith ((index: Int) => new Random(index + 42)){ _ => return; 0 }.count() + rdd.mapWith ((index: Int) => new Random(index + 42)){ (_, it) => return; 0 }.count() } def testFilterWith(rdd: RDD[Int]): Unit = { import java.util.Random - rdd.filterWith ((index: Int) => new Random(index + 42)){ _ => return; true }.count() + rdd.filterWith ((index: Int) => new Random(index + 42)){ (_, it) => return; true }.count() } def testForEachWith(rdd: RDD[Int]): Unit = { import java.util.Random - rdd.foreachWith ((index: Int) => new Random(index + 42)){ _ => return } + rdd.foreachWith ((index: Int) => new Random(index + 42)){ (_, it) => return } } def testMapPartitionsWithContext(rdd: RDD[Int]): Unit = { rdd.mapPartitionsWithContext { (_, it) => return; it }.count()