YARN-4831. Recovered containers will be killed after NM stateful restart. Contributed by Siqi Li
(cherry picked from commit 7e3c327d31
)
This commit is contained in:
parent
2cf3138d72
commit
e50215306d
|
@ -1496,6 +1496,9 @@ public class ContainerImpl implements Container {
|
||||||
static class KillOnNewTransition extends ContainerDoneTransition {
|
static class KillOnNewTransition extends ContainerDoneTransition {
|
||||||
@Override
|
@Override
|
||||||
public void transition(ContainerImpl container, ContainerEvent event) {
|
public void transition(ContainerImpl container, ContainerEvent event) {
|
||||||
|
if (container.recoveredStatus == RecoveredContainerStatus.COMPLETED) {
|
||||||
|
container.sendFinishedEvents();
|
||||||
|
} else {
|
||||||
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
ContainerKillEvent killEvent = (ContainerKillEvent) event;
|
||||||
container.exitCode = killEvent.getContainerExitStatus();
|
container.exitCode = killEvent.getContainerExitStatus();
|
||||||
container.addDiagnostics(killEvent.getDiagnostic(), "\n");
|
container.addDiagnostics(killEvent.getDiagnostic(), "\n");
|
||||||
|
@ -1508,6 +1511,7 @@ public class ContainerImpl implements Container {
|
||||||
super.transition(container, event);
|
super.transition(container, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the following transition:
|
* Handle the following transition:
|
||||||
|
|
Loading…
Reference in New Issue