File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed
main/scala/org/apache/spark
test/scala/org/apache/spark Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ private object FaultToleranceTest extends App with Logging {
252252 val f = Future {
253253 try {
254254 val res = sc.parallelize(0 until 10 ).collect()
255- assertTrue(res.toList == (0 until 10 ))
255+ assertTrue(res.toList == (0 until 10 ).toList )
256256 true
257257 } catch {
258258 case e : Exception =>
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ private[spark] class TaskSetManager(
338338 if (TaskLocality .isAllowed(locality, TaskLocality .RACK_LOCAL )) {
339339 for (rack <- sched.getRackForHost(host)) {
340340 for (index <- speculatableTasks if canRunOnHost(index)) {
341- val racks = tasks(index).preferredLocations.map(_.host).map (sched.getRackForHost)
341+ val racks = tasks(index).preferredLocations.map(_.host).flatMap (sched.getRackForHost)
342342 if (racks.contains(rack)) {
343343 speculatableTasks -= index
344344 return Some ((index, TaskLocality .RACK_LOCAL ))
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ trait RDDCheckpointTester { self: SparkFunSuite =>
5454 // Generate the final RDD using given RDD operation
5555 val baseRDD = generateFatRDD()
5656 val operatedRDD = op(baseRDD)
57- val parentRDD = operatedRDD.dependencies.headOption.orNull
57+ val parentDependency = operatedRDD.dependencies.headOption.orNull
5858 val rddType = operatedRDD.getClass.getSimpleName
5959 val numPartitions = operatedRDD.partitions.length
6060
@@ -82,7 +82,7 @@ trait RDDCheckpointTester { self: SparkFunSuite =>
8282 }
8383
8484 // Test whether dependencies have been changed from its earlier parent RDD
85- assert(operatedRDD.dependencies.head.rdd != parentRDD )
85+ assert(operatedRDD.dependencies.head != parentDependency )
8686
8787 // Test whether the partitions have been changed from its earlier partitions
8888 assert(operatedRDD.partitions.toList != partitionsBeforeCheckpoint.toList)
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ class PartitioningSuite extends SparkFunSuite with SharedSparkContext with Priva
163163 val hashP2 = new HashPartitioner (2 )
164164 assert(rangeP2 === rangeP2)
165165 assert(hashP2 === hashP2)
166- assert(hashP2 != rangeP2)
167- assert(rangeP2 != hashP2)
166+ assert(hashP2 !== rangeP2)
167+ assert(rangeP2 !== hashP2)
168168 }
169169
170170 test(" partitioner preservation" ) {
Original file line number Diff line number Diff line change @@ -289,7 +289,11 @@ class UISeleniumSuite extends SparkFunSuite with WebBrowser with Matchers with B
289289 JInt (stageId) <- stage \ " stageId"
290290 JInt (attemptId) <- stage \ " attemptId"
291291 } {
292- val exp = if (attemptId == 0 && stageId == 1 ) StageStatus .FAILED else StageStatus .COMPLETE
292+ val exp = if (attemptId.toInt == 0 && stageId.toInt == 1 ) {
293+ StageStatus .FAILED
294+ } else {
295+ StageStatus .COMPLETE
296+ }
293297 status should be (exp.name())
294298 }
295299
You can’t perform that action at this time.
0 commit comments