public virtual void ApplicationFinished(RMApp app, RMAppState finalState)
 {
     if (historyServiceEnabled)
     {
         dispatcher.GetEventHandler().Handle(new WritingApplicationFinishEvent(app.GetApplicationId
                                                                                   (), ApplicationFinishData.NewInstance(app.GetApplicationId(), app.GetFinishTime(
                                                                                                                             ), app.GetDiagnostics().ToString(), app.GetFinalApplicationStatus(), RMServerUtils
                                                                                                                         .CreateApplicationState(finalState))));
     }
 }
 /// <exception cref="System.IO.IOException"/>
 protected internal virtual void WriteApplicationFinishData(ApplicationId appId)
 {
     store.ApplicationFinished(ApplicationFinishData.NewInstance(appId, 0, appId.ToString
                                                                     (), FinalApplicationStatus.Undefined, YarnApplicationState.Finished));
 }