File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
core/src/test/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 18
18
package org .apache .spark .util
19
19
20
20
import java .io .NotSerializableException
21
+ import java .util .Random
21
22
22
23
import org .scalatest .FunSuite
23
24
@@ -266,19 +267,15 @@ private object TestUserClosuresActuallyCleaned {
266
267
rdd.mapPartitionsWithIndex { (_, it) => return ; it }.count()
267
268
}
268
269
def testFlatMapWith (rdd : RDD [Int ]): Unit = {
269
- import java .util .Random
270
270
rdd.flatMapWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; Seq () }.count()
271
271
}
272
272
def testMapWith (rdd : RDD [Int ]): Unit = {
273
- import java .util .Random
274
273
rdd.mapWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; 0 }.count()
275
274
}
276
275
def testFilterWith (rdd : RDD [Int ]): Unit = {
277
- import java .util .Random
278
276
rdd.filterWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; true }.count()
279
277
}
280
278
def testForEachWith (rdd : RDD [Int ]): Unit = {
281
- import java .util .Random
282
279
rdd.foreachWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return }
283
280
}
284
281
def testMapPartitionsWithContext (rdd : RDD [Int ]): Unit = {
You can’t perform that action at this time.
0 commit comments