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); }
ApplicationHistoryData data = store.getApplication(appId); Assert.assertNotNull(data); Assert.assertEquals(appId.toString(), data.getApplicationName()); Assert.assertEquals(appId.toString(), data.getDiagnosticsInfo());
Assert.assertEquals("test app", appHD.getApplicationName()); Assert.assertEquals("test app type", appHD.getApplicationType()); Assert.assertEquals("test user", appHD.getUser());
Assert.assertEquals("test app", appHD.getApplicationName()); Assert.assertEquals("test app type", appHD.getApplicationType()); Assert.assertEquals("test user", appHD.getUser());
ApplicationHistoryData appData = store.getApplication(appId); Assert.assertNotNull(appData); Assert.assertEquals(appId.toString(), appData.getApplicationName()); Assert.assertEquals(appId.toString(), appData.getDiagnosticsInfo());