Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8007#discussion_r38608268
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
    @@ -474,18 +509,26 @@ private[yarn] class YarnAllocator(
     
           containerIdToExecutorId.remove(containerId).foreach { eid =>
             executorIdToContainer.remove(eid)
    -
    +        pendingLossReasonRequests.remove(eid).foreach { pendingRequests =>
    +          pendingRequests.foreach(_.reply(exitReason))
    +        }
             if (!alreadyReleased) {
               // The executor could have gone away (like no route to host, 
node failure, etc)
               // Notify backend about the failure of the executor
               numUnexpectedContainerRelease += 1
    -          driverRef.send(RemoveExecutor(eid,
    -            s"Yarn deallocated the executor $eid (container 
$containerId)"))
    +          driverRef.send(RemoveExecutor(eid, exitReason))
             }
           }
         }
       }
     
    +  def enqueueGetLossReasonRequest(eid: String, context: RpcCallContext): 
Unit = synchronized {
    +    if (executorIdToContainer.contains(eid)) {
    +      pendingLossReasonRequests
    +        .getOrElseUpdate(eid, new ArrayBuffer[RpcCallContext]) += context
    --- End diff --
    
    I guess the alternative of limiting the number of requests sent to the AM 
is tricky because we need to keep a set of disconnected executor IDs, but we 
need to decide when to remove from that set. Responding for the same executor 
multiple times might be fine here if it's the simpler approach, but maybe we 
should have a comment up there to explain this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to