Github user skonto commented on a diff in the pull request: https://github.com/apache/spark/pull/18784#discussion_r130383697 --- Diff: core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala --- @@ -784,42 +784,6 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B assert(taskScheduler.runningTasksByExecutors.get("executor0").isEmpty) } - test("if a task finishes with TaskState.LOST its executor is marked as dead") { - sc = new SparkContext("local", "TaskSchedulerImplSuite") - val taskScheduler = new TaskSchedulerImpl(sc) - taskScheduler.initialize(new FakeSchedulerBackend) - // Need to initialize a DAGScheduler for the taskScheduler to use for callbacks. - new DAGScheduler(sc, taskScheduler) { - override def taskStarted(task: Task[_], taskInfo: TaskInfo) {} - override def executorAdded(execId: String, host: String) {} - } - - val e0Offers = IndexedSeq(WorkerOffer("executor0", "host0", 1)) - val attempt1 = FakeTask.createTaskSet(1) - - // submit attempt 1, offer resources, task gets scheduled - taskScheduler.submitTasks(attempt1) - val taskDescriptions = taskScheduler.resourceOffers(e0Offers).flatten - assert(1 === taskDescriptions.length) - - // Report the task as failed with TaskState.LOST - taskScheduler.statusUpdate( - tid = taskDescriptions.head.taskId, - state = TaskState.LOST, - serializedData = ByteBuffer.allocate(0) - ) - - // Check that state associated with the lost task attempt is cleaned up: - assert(taskScheduler.taskIdToExecutorId.isEmpty) - assert(taskScheduler.taskIdToTaskSetManager.isEmpty) - assert(taskScheduler.runningTasksByExecutors.get("executor0").isEmpty) - - // Check that the executor has been marked as dead - assert(!taskScheduler.isExecutorAlive("executor0")) - assert(!taskScheduler.hasExecutorsAliveOnHost("host0")) - assert(taskScheduler.getExecutorsAliveOnHost("host0").isEmpty) - } - --- End diff -- Test is only needed in the fine-grained case as it is th eonly case where the executor was killed in TaskSchedulerImpl.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org