@Override public void containerFinished(ContainerFinishData containerFinish) throws IOException { ConcurrentMap<ContainerId, ContainerHistoryData> subMap = getSubMap(containerFinish.getContainerId().getApplicationAttemptId()); ContainerHistoryData data = subMap.get(containerFinish.getContainerId()); if (data == null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is stored before" + " the start information."); } // Make the assumption that ContainerState should not be null if // the finish information is already recorded if (data.getContainerState() != null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is already stored."); } data.setFinishTime(containerFinish.getFinishTime()); data.setDiagnosticsInfo(containerFinish.getDiagnosticsInfo()); data.setContainerExitStatus(containerFinish.getContainerExitStatus()); data.setContainerState(containerFinish.getContainerState()); }
@Override public void containerFinished(ContainerFinishData containerFinish) throws IOException { ConcurrentMap<ContainerId, ContainerHistoryData> subMap = getSubMap(containerFinish.getContainerId().getApplicationAttemptId()); ContainerHistoryData data = subMap.get(containerFinish.getContainerId()); if (data == null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is stored before" + " the start information."); } // Make the assumption that ContainerState should not be null if // the finish information is already recorded if (data.getContainerState() != null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is already stored."); } data.setFinishTime(containerFinish.getFinishTime()); data.setDiagnosticsInfo(containerFinish.getDiagnosticsInfo()); data.setContainerExitStatus(containerFinish.getContainerExitStatus()); data.setContainerState(containerFinish.getContainerState()); }
@Override public void containerFinished(ContainerFinishData containerFinish) throws IOException { ConcurrentMap<ContainerId, ContainerHistoryData> subMap = getSubMap(containerFinish.getContainerId().getApplicationAttemptId()); ContainerHistoryData data = subMap.get(containerFinish.getContainerId()); if (data == null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is stored before" + " the start information."); } // Make the assumption that ContainerState should not be null if // the finish information is already recorded if (data.getContainerState() != null) { throw new IOException("The finish information of container " + containerFinish.getContainerId() + " is already stored."); } data.setFinishTime(containerFinish.getFinishTime()); data.setDiagnosticsInfo(containerFinish.getDiagnosticsInfo()); data.setContainerExitStatus(containerFinish.getContainerExitStatus()); data.setContainerState(containerFinish.getContainerState()); }
private ContainerReport convertToContainerReport( ContainerHistoryData containerHistory, String user) { // If the container has the aggregated log, add the server root url String logUrl = WebAppUtils.getAggregatedLogURL( serverHttpAddress, containerHistory.getAssignedNode().toString(), containerHistory.getContainerId().toString(), containerHistory.getContainerId().toString(), user); return ContainerReport.newInstance(containerHistory.getContainerId(), containerHistory.getAllocatedResource(), containerHistory.getAssignedNode(), containerHistory.getPriority(), containerHistory.getStartTime(), containerHistory.getFinishTime(), containerHistory.getDiagnosticsInfo(), logUrl, containerHistory.getContainerExitStatus(), containerHistory.getContainerState(), null); }
private ContainerReport convertToContainerReport( ContainerHistoryData containerHistory, String user) { // If the container has the aggregated log, add the server root url String logUrl = WebAppUtils.getAggregatedLogURL( serverHttpAddress, containerHistory.getAssignedNode().toString(), containerHistory.getContainerId().toString(), containerHistory.getContainerId().toString(), user); return ContainerReport.newInstance(containerHistory.getContainerId(), containerHistory.getAllocatedResource(), containerHistory.getAssignedNode(), containerHistory.getPriority(), containerHistory.getStartTime(), containerHistory.getFinishTime(), containerHistory.getDiagnosticsInfo(), logUrl, containerHistory.getContainerExitStatus(), containerHistory.getContainerState(), null); }
private ContainerReport convertToContainerReport( ContainerHistoryData containerHistory, String user) { // If the container has the aggregated log, add the server root url String logUrl = WebAppUtils.getAggregatedLogURL( serverHttpAddress, containerHistory.getAssignedNode().toString(), containerHistory.getContainerId().toString(), containerHistory.getContainerId().toString(), user); return ContainerReport.newInstance(containerHistory.getContainerId(), containerHistory.getAllocatedResource(), containerHistory.getAssignedNode(), containerHistory.getPriority(), containerHistory.getStartTime(), containerHistory.getFinishTime(), containerHistory.getDiagnosticsInfo(), logUrl, containerHistory.getContainerExitStatus(), containerHistory.getContainerState(), null); }
store.getContainer(ContainerId.newContainerId(ApplicationAttemptId .newInstance(ApplicationId.newInstance(0, 1), 1), 1)); if (containerHD.getContainerState() != null) { break; } else { Assert.assertEquals(-1, containerHD.getContainerExitStatus()); Assert.assertEquals(ContainerState.COMPLETE, containerHD.getContainerState());
store.getContainer(ContainerId.newContainerId(ApplicationAttemptId .newInstance(ApplicationId.newInstance(0, 1), 1), 1)); if (containerHD.getContainerState() != null) { break; } else { Assert.assertEquals(-1, containerHD.getContainerExitStatus()); Assert.assertEquals(ContainerState.COMPLETE, containerHD.getContainerState());