Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/8007#discussion_r38608149
--- 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 --
when will this have multiple contexts? The driver should only ask once
shouldn't it? If the concern is because `onDisconnected` could happen multiple
times, then maybe we should just check whether we already have a request for a
particular executor ID instead of responding multiple times.
---
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]