amContainer.getId(), ContainerState.COMPLETE, "", 0), anyNodeId)); when(scheduler.getSchedulerAppInfo(eq(attemptId))).thenReturn(null);
private void checkTaskContainersHost(ApplicationAttemptId attemptId, ContainerId containerId, ResourceManager rm, String host) { YarnScheduler scheduler = rm.getRMContext().getScheduler(); SchedulerAppReport appReport = scheduler.getSchedulerAppInfo(attemptId); Assert.assertTrue(appReport.getLiveContainers().size() > 0); for (RMContainer c : appReport.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { Assert.assertEquals(host, c.getAllocatedNode().getHost()); } } }
private void checkTaskContainersHost(ApplicationAttemptId attemptId, ContainerId containerId, ResourceManager rm, String host) { YarnScheduler scheduler = rm.getRMContext().getScheduler(); SchedulerAppReport appReport = scheduler.getSchedulerAppInfo(attemptId); Assert.assertTrue(appReport.getLiveContainers().size() > 0); for (RMContainer c : appReport.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { Assert.assertEquals(host, c.getAllocatedNode().getHost()); } } }
amContainer.getId(), ContainerState.COMPLETE, "", 0), anyNodeId)); when(scheduler.getSchedulerAppInfo(eq(attemptId))).thenReturn(null);