holdenk commented on a change in pull request #29032:
URL: https://github.com/apache/spark/pull/29032#discussion_r457697698
##########
File path: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
##########
@@ -871,7 +871,7 @@ private[deploy] class Master(
logInfo("Telling app of decommission executors")
exec.application.driver.send(ExecutorUpdated(
exec.id, ExecutorState.DECOMMISSIONED,
- Some("worker decommissioned"), None, workerLost = false))
+ Some("worker decommissioned"), None, workerLost = true))
Review comment:
Why did this need to change to true?
##########
File path:
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
##########
@@ -166,11 +166,12 @@ private[spark] class CoarseGrainedExecutorBackend(
exitExecutor(1, "Received LaunchTask command but executor was null")
} else {
if (decommissioned) {
- logError("Asked to launch a task while decommissioned.")
+ val msg = "Asked to launch a task while decommissioned."
+ logError(msg)
driver match {
case Some(endpoint) =>
logInfo("Sending DecommissionExecutor to driver.")
- endpoint.send(DecommissionExecutor(executorId))
+ endpoint.send(DecommissionExecutor(executorId,
ExecutorDecommissionInfo(msg, false)))
Review comment:
minor style nit: I like to pass by name when I'm passing a bare boolean,
I think it makes the code easier to read.
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala
##########
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.scheduler
+
+/**
+ * Provides more detail when an executor is being decommissioned.
+ * @param message Human readable reason for why the decommissioning is
happening.
+ * @param isHostDecommissioned Whether the host (aka the `node` or `worker` in
other places) is
+ * being decommissioned too. Used to infer if the
shuffle data might
+ * be lost if external shuffle service is enabled.
Review comment:
How about "even if the external shuffle service" for clarity?
##########
File path:
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
##########
@@ -166,11 +166,12 @@ private[spark] class CoarseGrainedExecutorBackend(
exitExecutor(1, "Received LaunchTask command but executor was null")
} else {
if (decommissioned) {
- logError("Asked to launch a task while decommissioned.")
+ val msg = "Asked to launch a task while decommissioned."
+ logError(msg)
Review comment:
Is there a reason we broke this on two lines (here and elsewhere)? I
don't have strong feelings just if theres been a change to the style want to
make sure I'm in the loop.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]