Skip to content

Commit

Permalink
Try to get correct syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tedyu committed May 8, 2015
1 parent 55d01eb commit 36feb6c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 36feb6c

Please sign in to comment.