Skip to content

Commit 86c0ff6

Browse files
committed
Allow tasks to launch in the executor base class as well
1 parent 317c76b commit 86c0ff6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

core/src/main/scala/org/apache/spark/executor/Executor.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,11 @@ private[spark] class Executor(
248248
}
249249

250250
def launchTask(context: ExecutorBackend, taskDescription: TaskDescription): Unit = {
251-
if (!decommissioned) {
252-
val tr = new TaskRunner(context, taskDescription)
253-
runningTasks.put(taskDescription.taskId, tr)
254-
threadPool.execute(tr)
255-
} else {
256-
log.info(s"Not launching task, executor is in decommissioned state")
251+
val tr = new TaskRunner(context, taskDescription)
252+
runningTasks.put(taskDescription.taskId, tr)
253+
threadPool.execute(tr)
254+
if (decommissioned) {
255+
log.error(s"Launching a task while in decommissioned state.")
257256
}
258257
}
259258

core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, val rpcEnv: Rp
428428
scheduler.executorDecommission(executorId)
429429
}
430430
shouldDisable
431-
}
431+
}
432432

433433
/**
434434
* Stop making resource offers for the given executor. The executor is marked as lost with

0 commit comments

Comments
 (0)