private ApplicationReport convertToApplicationReport( ApplicationHistoryData appHistory) throws IOException { ApplicationAttemptId currentApplicationAttemptId = null; String trackingUrl = UNAVAILABLE; String host = UNAVAILABLE; int rpcPort = -1; ApplicationAttemptHistoryData lastAttempt = getLastAttempt(appHistory.getApplicationId()); if (lastAttempt != null) { currentApplicationAttemptId = lastAttempt.getApplicationAttemptId(); trackingUrl = lastAttempt.getTrackingURL(); host = lastAttempt.getHost(); rpcPort = lastAttempt.getRPCPort(); } return ApplicationReport.newInstance(appHistory.getApplicationId(), currentApplicationAttemptId, appHistory.getUser(), appHistory.getQueue(), appHistory.getApplicationName(), host, rpcPort, null, appHistory.getYarnApplicationState(), appHistory.getDiagnosticsInfo(), trackingUrl, appHistory.getStartTime(), appHistory.getFinishTime(), appHistory.getFinalApplicationStatus(), null, "", 100, appHistory.getApplicationType(), null); }
private ApplicationReport convertToApplicationReport( ApplicationHistoryData appHistory) throws IOException { ApplicationAttemptId currentApplicationAttemptId = null; String trackingUrl = UNAVAILABLE; String host = UNAVAILABLE; int rpcPort = -1; ApplicationAttemptHistoryData lastAttempt = getLastAttempt(appHistory.getApplicationId()); if (lastAttempt != null) { currentApplicationAttemptId = lastAttempt.getApplicationAttemptId(); trackingUrl = lastAttempt.getTrackingURL(); host = lastAttempt.getHost(); rpcPort = lastAttempt.getRPCPort(); } return ApplicationReport.newInstance(appHistory.getApplicationId(), currentApplicationAttemptId, appHistory.getUser(), appHistory.getQueue(), appHistory.getApplicationName(), host, rpcPort, null, appHistory.getYarnApplicationState(), appHistory.getDiagnosticsInfo(), trackingUrl, appHistory.getStartTime(), appHistory.getFinishTime(), appHistory.getFinalApplicationStatus(), null, "", 100, appHistory.getApplicationType(), null); }
private ApplicationReport convertToApplicationReport( ApplicationHistoryData appHistory) throws IOException { ApplicationAttemptId currentApplicationAttemptId = null; String trackingUrl = UNAVAILABLE; String host = UNAVAILABLE; int rpcPort = -1; ApplicationAttemptHistoryData lastAttempt = getLastAttempt(appHistory.getApplicationId()); if (lastAttempt != null) { currentApplicationAttemptId = lastAttempt.getApplicationAttemptId(); trackingUrl = lastAttempt.getTrackingURL(); host = lastAttempt.getHost(); rpcPort = lastAttempt.getRPCPort(); } return ApplicationReport.newInstance(appHistory.getApplicationId(), currentApplicationAttemptId, appHistory.getUser(), appHistory.getQueue(), appHistory.getApplicationName(), host, rpcPort, null, appHistory.getYarnApplicationState(), appHistory.getDiagnosticsInfo(), trackingUrl, appHistory.getStartTime(), 0, appHistory.getFinishTime(), appHistory.getFinalApplicationStatus(), null, "", 100, appHistory.getApplicationType(), null); }
Assert.assertEquals(2L, appHD.getFinishTime()); Assert.assertEquals("test diagnostics info", appHD.getDiagnosticsInfo()); Assert.assertEquals(FinalApplicationStatus.UNDEFINED,
Assert.assertEquals(2L, appHD.getFinishTime()); Assert.assertEquals("test diagnostics info", appHD.getDiagnosticsInfo()); Assert.assertEquals(FinalApplicationStatus.UNDEFINED,