Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/8007#discussion_r39098375
--- Diff:
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala ---
@@ -474,18 +502,31 @@ 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))
}
}
}
}
+ /**
+ * Register that some RpcCallContext has asked the AM why the executor
was lost. Note that
+ * we can only find the loss reason to send back in the next call to
allocateResources().
+ */
+ private[yarn] def enqueueGetLossReasonRequest(eid: String, context:
RpcCallContext): Unit
+ = synchronized {
--- End diff --
style:
```
private[yarn] def enqueueGetLossReasonRequest(
eid: String,
context: RpcCallContext): Unit = synchronized = {
...
}
```
---
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]