private static void MergeApplicationHistoryData(ApplicationHistoryData historyData , ApplicationFinishData finishData) { historyData.SetFinishTime(finishData.GetFinishTime()); historyData.SetDiagnosticsInfo(finishData.GetDiagnosticsInfo()); historyData.SetFinalApplicationStatus(finishData.GetFinalApplicationStatus()); historyData.SetYarnApplicationState(finishData.GetYarnApplicationState()); }
/// <exception cref="System.IO.IOException"/> public virtual void ApplicationFinished(ApplicationFinishData appFinish) { ApplicationHistoryData data = applicationData[appFinish.GetApplicationId()]; if (data == null) { throw new IOException("The finish information of application " + appFinish.GetApplicationId () + " is stored before the start" + " information."); } // Make the assumption that YarnApplicationState should not be null if // the finish information is already recorded if (data.GetYarnApplicationState() != null) { throw new IOException("The finish information of application " + appFinish.GetApplicationId () + " is already stored."); } data.SetFinishTime(appFinish.GetFinishTime()); data.SetDiagnosticsInfo(appFinish.GetDiagnosticsInfo()); data.SetFinalApplicationStatus(appFinish.GetFinalApplicationStatus()); data.SetYarnApplicationState(appFinish.GetYarnApplicationState()); }