- NM is launching the container
protected int prepareForLaunch(ContainerStartContext ctx) throws IOException {
ContainerId containerId = container.getContainerId();//crash point
dispatcher.getEventHandler().handle(new ContainerEvent(
containerId,
ContainerEventType.CONTAINER_LAUNCHED));
}
- Shutdown command is sent to NM who holds the container.
- Recovery process will send KILL event to Container, and the state change to DONE
- Then Launcher will send LAUNCH_FAILED event to RMContainer( in code#6)
- The sleep after shutdown is very important to flip the KILL event and LAUNCHED event.
pre-read
org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch call 289