[GitHub] [spark] iRakson commented on a change in pull request #26315: [SPARK-29152][CORE] Executor Plugin shutdown when dynamic allocation is ena…

2019-11-11 Thread GitBox
iRakson commented on a change in pull request #26315: [SPARK-29152][CORE] 
Executor Plugin shutdown when dynamic allocation is ena…
URL: https://github.com/apache/spark/pull/26315#discussion_r344714361
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
 ##
 @@ -65,6 +65,12 @@ private[spark] class Executor(
 
   logInfo(s"Starting executor ID $executorId on host $executorHostname")
 
+  @volatile private var executorShutdown = false
+  ShutdownHookManager.addShutdownHook(
+() => if (!executorShutdown) {
 
 Review comment:
   Please review it.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] [spark] iRakson commented on a change in pull request #26315: [SPARK-29152][CORE] Executor Plugin shutdown when dynamic allocation is ena…

2019-11-10 Thread GitBox
iRakson commented on a change in pull request #26315: [SPARK-29152][CORE] 
Executor Plugin shutdown when dynamic allocation is ena…
URL: https://github.com/apache/spark/pull/26315#discussion_r344551590
 
 

 ##
 File path: core/src/main/scala/org/apache/spark/executor/Executor.scala
 ##
 @@ -65,6 +65,12 @@ private[spark] class Executor(
 
   logInfo(s"Starting executor ID $executorId on host $executorHostname")
 
+  @volatile private var executorShutdown = false
+  ShutdownHookManager.addShutdownHook(
+() => if (!executorShutdown) {
 
 Review comment:
   If i don't check it here then stop() method will be called twice in case of 
graceful shutdown.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org