vanzin commented on a change in pull request #26315: [SPARK-29152] Executor 
Plugin shutdown when dynamic allocation is ena…
URL: https://github.com/apache/spark/pull/26315#discussion_r342831458
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
 ##########
 @@ -64,6 +64,12 @@ private[spark] class Executor(
 
   logInfo(s"Starting executor ID $executorId on host $executorHostname")
 
+  private var executorShutdown = false
+  ShutdownHookManager.addShutdownHook(
+    () => if (!executorShutdown) {
+      pluginShutdown
 
 Review comment:
   Why single out plugin shutdown?
   
   This should just call `stop()`. And `stop()` should be idempotent.

----------------------------------------------------------------
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]

Reply via email to