agrawaldevesh commented on a change in pull request #29014:
URL: https://github.com/apache/spark/pull/29014#discussion_r453744110



##########
File path: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -911,13 +913,33 @@ private[spark] class TaskSchedulerImpl(
     }
   }
 
-  override def executorDecommission(executorId: String): Unit = {
+  override def executorDecommission(executorId: String,
+                                    decommissionInfo: DecommissionInfo): Unit 
= {
+    synchronized {
+      if (!executorsPendingDecommission.contains(executorId)) {
+        executorsPendingDecommission(executorId) = decommissionInfo
+      }
+    }
     rootPool.executorDecommission(executorId)
     backend.reviveOffers()
   }
 
-  override def executorLost(executorId: String, reason: ExecutorLossReason): 
Unit = {
+  override def getExecutorDecommissionInfo(executorId: String): 
Option[DecommissionInfo] =
+    synchronized {
+   executorsPendingDecommission.get(executorId)
+  }
+
+  override def executorLost(executorId: String, givenReason: 
ExecutorLossReason): Unit = {
     var failedExecutor: Option[String] = None
+    val executorLostWithShuffleLost = 
getExecutorDecommissionInfo(executorId).map(
+      _.isShuffleLost(sc.env.blockManager.externalShuffleServiceEnabled))

Review comment:
       Neat !!!




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

Reply via email to