File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
main/scala/org/apache/spark/scheduler
test/scala/org/apache/spark/scheduler Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,8 @@ private[spark] class TaskSchedulerImpl(
251251 for (task <- taskSet.resourceOffer(execId, host, maxLocality)) {
252252 tasks(i) += task
253253 val tid = task.taskId
254- taskIdToStageIdAndAttempt(tid) = (taskSet.taskSet.stageId, taskSet.taskSet.stageAttemptId)
254+ taskIdToStageIdAndAttempt(tid) =
255+ (taskSet.taskSet.stageId, taskSet.taskSet.stageAttemptId)
255256 taskIdToExecutorId(tid) = execId
256257 executorsByHost(host) += execId
257258 availableCpus(i) -= CPUS_PER_TASK
@@ -547,7 +548,9 @@ private[spark] class TaskSchedulerImpl(
547548 }
548549 }
549550
550- private [scheduler] def taskSetManagerForAttempt (stageId : Int , stageAttemptId : Int ): Option [TaskSetManager ] = {
551+ private [scheduler] def taskSetManagerForAttempt (
552+ stageId : Int ,
553+ stageAttemptId : Int ): Option [TaskSetManager ] = {
551554 for {
552555 attempts <- taskSetsByStage.get(stageId)
553556 manager <- attempts.get(stageAttemptId)
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with L
219219 val taskDescriptions2 = taskScheduler.resourceOffers(workerOffers).flatten
220220 assert(0 === taskDescriptions2.length)
221221
222- // submit attempt 2
222+ // submit attempt 2
223223 val attempt2 = FakeTask .createTaskSet(10 , 1 )
224224 taskScheduler.submitTasks(attempt2)
225225
You can’t perform that action at this time.
0 commit comments