YARN-3987. Send AM container completed msg to NM once AM finishes. Contributed by sandflee
This commit is contained in:
parent
7a445fcfab
commit
0a030546e2
@ -769,6 +769,9 @@ Release 2.8.0 - UNRELEASED
|
|||||||
YARN-4047. ClientRMService getApplications has high scheduler lock contention.
|
YARN-4047. ClientRMService getApplications has high scheduler lock contention.
|
||||||
(Jason Lowe via jianhe)
|
(Jason Lowe via jianhe)
|
||||||
|
|
||||||
|
YARN-3987. Send AM container completed msg to NM once AM finishes.
|
||||||
|
(sandflee via jianhe)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -1658,6 +1658,16 @@ public RMAppAttemptState transition(RMAppAttemptImpl appAttempt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ack NM to remove finished AM container, not waiting for
|
||||||
|
// new appattempt to pull am container complete msg, new appattempt
|
||||||
|
// may launch fail and leaves too many completed container in NM
|
||||||
|
private void sendFinishedAMContainerToNM(NodeId nodeId,
|
||||||
|
ContainerId containerId) {
|
||||||
|
List<ContainerId> containerIdList = new ArrayList<ContainerId>();
|
||||||
|
containerIdList.add(containerId);
|
||||||
|
eventHandler.handle(new RMNodeFinishedContainersPulledByAMEvent(
|
||||||
|
nodeId, containerIdList));
|
||||||
|
}
|
||||||
|
|
||||||
// Ack NM to remove finished containers from context.
|
// Ack NM to remove finished containers from context.
|
||||||
private void sendFinishedContainersToNM() {
|
private void sendFinishedContainersToNM() {
|
||||||
@ -1686,9 +1696,13 @@ private void sendAMContainerToNM(RMAppAttemptImpl appAttempt,
|
|||||||
new ArrayList<ContainerStatus>());
|
new ArrayList<ContainerStatus>());
|
||||||
appAttempt.finishedContainersSentToAM.get(nodeId).add(
|
appAttempt.finishedContainersSentToAM.get(nodeId).add(
|
||||||
containerFinishedEvent.getContainerStatus());
|
containerFinishedEvent.getContainerStatus());
|
||||||
|
|
||||||
if (!appAttempt.getSubmissionContext()
|
if (!appAttempt.getSubmissionContext()
|
||||||
.getKeepContainersAcrossApplicationAttempts()) {
|
.getKeepContainersAcrossApplicationAttempts()) {
|
||||||
appAttempt.sendFinishedContainersToNM();
|
appAttempt.sendFinishedContainersToNM();
|
||||||
|
} else {
|
||||||
|
appAttempt.sendFinishedAMContainerToNM(nodeId,
|
||||||
|
containerFinishedEvent.getContainerStatus().getContainerId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user