app.finishTime = System.currentTimeMillis();
}
app.handler.handle(new AppRemovedSchedulerEvent(app.applicationId,
finalState));
app.handler.handle(
new RMAppManagerEvent(app.applicationId,
RMAppManagerEventType.APP_COMPLETED));
app.rmContext.getRMApplicationHistoryWriter()
.applicationFinished(app, finalState);
};