YARN-5049. Addendum patch for branch-2. (asuresh)
This commit is contained in:
parent
90ac8cd5a1
commit
c153bed6e3
@ -465,20 +465,13 @@ private void recoverContainer(RecoveredContainerState rcs)
|
|||||||
|
|
||||||
Application app = context.getApplications().get(appId);
|
Application app = context.getApplications().get(appId);
|
||||||
if (app != null) {
|
if (app != null) {
|
||||||
Credentials credentials =
|
recoverActiveContainer(launchContext, token, rcs);
|
||||||
YarnServerSecurityUtils.parseCredentials(launchContext);
|
|
||||||
Container container = new ContainerImpl(getConfig(), dispatcher,
|
|
||||||
req.getContainerLaunchContext(),
|
|
||||||
credentials, metrics, token, context, rcs);
|
|
||||||
context.getContainers().put(containerId, container);
|
|
||||||
app.handle(new ApplicationContainerInitEvent(container));
|
|
||||||
if (rcs.getRecoveryType() == RecoveredContainerType.KILL) {
|
if (rcs.getRecoveryType() == RecoveredContainerType.KILL) {
|
||||||
dispatcher.getEventHandler().handle(
|
dispatcher.getEventHandler().handle(
|
||||||
new ContainerKillEvent(containerId, ContainerExitStatus.ABORTED,
|
new ContainerKillEvent(containerId, ContainerExitStatus.ABORTED,
|
||||||
"Due to invalid StateStore info container was killed"
|
"Due to invalid StateStore info container was killed"
|
||||||
+ " during recovery"));
|
+ " during recovery"));
|
||||||
}
|
}
|
||||||
recoverActiveContainer(launchContext, token, rcs);
|
|
||||||
} else {
|
} else {
|
||||||
if (rcs.getStatus() != RecoveredContainerStatus.COMPLETED) {
|
if (rcs.getStatus() != RecoveredContainerStatus.COMPLETED) {
|
||||||
LOG.warn(containerId + " has no corresponding application!");
|
LOG.warn(containerId + " has no corresponding application!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user