squito commented on a change in pull request #24375: [SPARK-27474][CORE] avoid
retrying a task failed with CommitDeniedException many times
URL: https://github.com/apache/spark/pull/24375#discussion_r276887492
##########
File path:
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
##########
@@ -1386,39 +1386,17 @@ class TaskSetManagerSuite extends SparkFunSuite with
LocalSparkContext with Logg
val dagScheduler = new FakeDAGScheduler(sc, sched)
sched.setDAGScheduler(dagScheduler)
- val taskSet1 = FakeTask.createTaskSet(10)
- val accumUpdatesByTask: Array[Seq[AccumulatorV2[_, _]]] =
taskSet1.tasks.map { task =>
- task.metrics.internalAccums
- }
+ val taskSet = FakeTask.createTaskSet(10)
- sched.submitTasks(taskSet1)
+ sched.submitTasks(taskSet)
sched.resourceOffers(
- (0 until 10).map { idx => WorkerOffer(s"exec-$idx", s"host-$idx", 1) })
-
- val taskSetManager1 = sched.taskSetManagerForAttempt(0, 0).get
-
- // fail fetch
- taskSetManager1.handleFailedTask(
- taskSetManager1.taskAttempts.head.head.taskId, TaskState.FAILED,
- FetchFailed(null, 0, 0, 0, "fetch failed"))
-
- assert(taskSetManager1.isZombie)
- assert(taskSetManager1.runningTasks === 9)
-
- val taskSet2 = FakeTask.createTaskSet(10, stageAttemptId = 1)
- sched.submitTasks(taskSet2)
- sched.resourceOffers(
- (11 until 20).map { idx => WorkerOffer(s"exec-$idx", s"host-$idx", 1) })
-
- // Complete the 2 tasks and leave 8 task in running
- for (id <- Set(0, 1)) {
- taskSetManager1.handleSuccessfulTask(id, createTaskResult(id,
accumUpdatesByTask(id)))
- assert(sched.endedTasks(id) === Success)
- }
Review comment:
I think now that you're using the duration across stage attempts for
speculation, you don't need to change this test anymore -- but I also don't
feel strongly that we really need to keep the old test either.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]