jiangxb1987 commented on a change in pull request #31348:
URL: https://github.com/apache/spark/pull/31348#discussion_r570008104
##########
File path:
core/src/main/scala/org/apache/spark/deploy/client/StandaloneAppClient.scala
##########
@@ -321,4 +321,15 @@ private[spark] class StandaloneAppClient(
}
}
+ /**
+ * Notify the Master about the removal of the executor
+ */
+ def executorRemoved(executorId: String): Unit = {
+ if (endpoint.get != null && appId.get != null) {
+ endpoint.get.send(ExecutorRemoved(appId.get, executorId))
Review comment:
maybe avoid calling `endpoint.get` and `appId.get` repeatedly?
##########
File path:
core/src/main/scala/org/apache/spark/deploy/client/StandaloneAppClient.scala
##########
@@ -321,4 +321,15 @@ private[spark] class StandaloneAppClient(
}
}
+ /**
+ * Notify the Master about the removal of the executor
+ */
+ def executorRemoved(executorId: String): Unit = {
+ if (endpoint.get != null && appId.get != null) {
+ endpoint.get.send(ExecutorRemoved(appId.get, executorId))
+ } else {
+ logWarning("Attempted to notify removed executor before driver fully
initialized.")
Review comment:
could we also include the executorId and appId in the warning message?
##########
File path: core/src/main/scala/org/apache/spark/deploy/DeployMessage.scala
##########
@@ -200,6 +200,8 @@ private[deploy] object DeployMessages {
case class KillExecutors(appId: String, executorIds: Seq[String])
+ case class ExecutorRemoved(appId: String, executorId: String)
Review comment:
Why not reuse the `ExecutorUpdated` message?
----------------------------------------------------------------
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]