tgravescs commented on a change in pull request #26440: 
[WIP][SPARK-20628][CORE] Start to improve Spark decommissioning & preemption 
support
URL: https://github.com/apache/spark/pull/26440#discussion_r344378043
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/master/Master.scala
 ##########
 @@ -243,6 +243,15 @@ private[deploy] class Master(
       logError("Leadership has been revoked -- master shutting down.")
       System.exit(0)
 
+    case WorkerDecommission(id, workerRef) =>
+      logInfo("Recording worker %s decommissioning".format(id))
+      if (state == RecoveryState.STANDBY) {
+        workerRef.send(MasterInStandby)
+      } else {
+        // If a worker attempts to decommission that isn't registered ignore 
it.
+        idToWorker.get(id).foreach(decommissionWorker)
 
 Review comment:
   might want to have a getOrElse or make sure idToWorker contains id in case 
something else timed out the worker between when message sent and when 
processed.

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