From e01b7aa9ae3640a23ee769f7ce779332e25db5b6 Mon Sep 17 00:00:00 2001 From: Imran Rashid Date: Fri, 17 Jul 2015 13:34:55 -0500 Subject: [PATCH] fix some comments, style --- .../org/apache/spark/scheduler/DAGSchedulerSuite.scala | 9 +++++---- .../apache/spark/scheduler/TaskSchedulerImplSuite.scala | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala index 25cbc3f884b00..b296be1e07657 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala @@ -611,9 +611,9 @@ class DAGSchedulerSuite // Another ResubmitFailedStages event should not result in another attempt for the map // stage being run concurrently. - // NOTE: the actual ResubmitFailedStages may get called at any time during this, shouldn't - // effect anything -- our calling it just makes *SURE* it gets called between the desired event - // and our check. + // NOTE: the actual ResubmitFailedStages may get called at any time during this, but it + // shouldn't effect anything -- our calling it just makes *SURE* it gets called between the + // desired event and our check. runEvent(ResubmitFailedStages) sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS) assert(countSubmittedMapStageAttempts() === 2) @@ -680,7 +680,8 @@ class DAGSchedulerSuite createFakeTaskInfo(), null)) - // Trigger resubmission of the failed map stage and finish the re-started map task. + // Running ResubmitFailedStages shouldn't result in any more attempts for the map stage, because + // the FetchFailed should have been ignored runEvent(ResubmitFailedStages) // The FetchFailed from the original reduce stage should be ignored. diff --git a/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala index b734d3ae0be7c..c2edd4c317d6e 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala @@ -231,7 +231,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with L val taskDescriptions3 = taskScheduler.resourceOffers(workerOffers).flatten assert(10 === taskDescriptions3.length) - taskDescriptions3.foreach{ task => + taskDescriptions3.foreach { task => val mgr = taskScheduler.taskIdToTaskSetManager.get(task.taskId).get assert(mgr.taskSet.stageAttemptId === 1) }