vanzin commented on a change in pull request #26440:
[WIP][SPARK-20628][CORE][K8S] Start to improve Spark decommissioning &
preemption support
URL: https://github.com/apache/spark/pull/26440#discussion_r363467451
##########
File path:
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
##########
@@ -140,6 +144,16 @@ private[spark] class CoarseGrainedExecutorBackend(
if (executor == null) {
exitExecutor(1, "Received LaunchTask command but executor was null")
} else {
+ if (decommissioned) {
+ logError("Asked to launch a task while decommissioned.")
+ driver match {
+ case Some(endpoint) =>
Review comment:
I think that instead of doing this here, it should be done in `onStart`
where the driver reference is created. That means the decommission message is
sent to the driver as soon as possible after the signal arrives, instead of
waiting for the driver to try to use the executor for something.
(That also means this block can go away and you can just keep the log
message in `Executor.scala`.)
----------------------------------------------------------------
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]