use of org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationContainerFinishedEvent in project hadoop by apache.
the class ContainerImpl method sendFinishedEvents.
@SuppressWarnings("unchecked")
private void sendFinishedEvents() {
// Inform the application
@SuppressWarnings("rawtypes") EventHandler eventHandler = dispatcher.getEventHandler();
ContainerStatus containerStatus = cloneAndGetContainerStatus();
eventHandler.handle(new ApplicationContainerFinishedEvent(containerStatus));
// Tell the scheduler the container is Done
eventHandler.handle(new ContainerSchedulerEvent(this, ContainerSchedulerEventType.CONTAINER_COMPLETED));
// Remove the container from the resource-monitor
eventHandler.handle(new ContainerStopMonitoringEvent(containerId));
// Tell the logService too
eventHandler.handle(new LogHandlerContainerFinishedEvent(containerId, exitCode));
}
use of org.apache.hadoop.yarn.server.nodemanager.containermanager.application.ApplicationContainerFinishedEvent in project hadoop by apache.
the class NMTimelinePublisher method publishApplicationEvent.
public void publishApplicationEvent(ApplicationEvent event) {
// publish only when the desired event is received
switch(event.getType()) {
case INIT_APPLICATION:
case FINISH_APPLICATION:
case APPLICATION_LOG_HANDLING_FAILED:
// not sure to publish under which entity
break;
case APPLICATION_CONTAINER_FINISHED:
// this is actually used to publish the container Event
ApplicationContainerFinishedEvent evnt = (ApplicationContainerFinishedEvent) event;
publishContainerFinishedEvent(evnt.getContainerStatus(), event.getTimestamp());
break;
default:
if (LOG.isDebugEnabled()) {
LOG.debug(event.getType() + " is not a desired ApplicationEvent which" + " needs to be published by NMTimelinePublisher");
}
break;
}
}
Aggregations