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 1818package org .apache .spark .util
1919
2020import java .io .NotSerializableException
21+ import java .util .Random
2122
2223import org .scalatest .FunSuite
2324
@@ -266,19 +267,15 @@ private object TestUserClosuresActuallyCleaned {
266267 rdd.mapPartitionsWithIndex { (_, it) => return ; it }.count()
267268 }
268269 def testFlatMapWith (rdd : RDD [Int ]): Unit = {
269- import java .util .Random
270270 rdd.flatMapWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; Seq () }.count()
271271 }
272272 def testMapWith (rdd : RDD [Int ]): Unit = {
273- import java .util .Random
274273 rdd.mapWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; 0 }.count()
275274 }
276275 def testFilterWith (rdd : RDD [Int ]): Unit = {
277- import java .util .Random
278276 rdd.filterWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return ; true }.count()
279277 }
280278 def testForEachWith (rdd : RDD [Int ]): Unit = {
281- import java .util .Random
282279 rdd.foreachWith ((index : Int ) => new Random (index + 42 )){ (_, it) => return }
283280 }
284281 def testMapPartitionsWithContext (rdd : RDD [Int ]): Unit = {
You can’t perform that action at this time.
0 commit comments