@Override public Integer getValue() { SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId); return app.getLiveContainers().size(); } }
@Override public SchedulerAppReport getSchedulerAppInfo( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return new SchedulerAppReport(attempt); }
@Override public Integer getValue() { SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId); return app.getReservedContainers().size(); } }
for (ContainerId containerId : containerIds) { Container container = null; for (RMContainer c : report.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer(); for (RMContainer c : report.getReservedContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer(); if (! preemptionContainerMap.containsKey(containerId)) { Container container = null; for (RMContainer c : report.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer();
for (ContainerId containerId : containerIds) { Container container = null; for (RMContainer c : report.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer(); for (RMContainer c : report.getReservedContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer(); if (! preemptionContainerMap.containsKey(containerId)) { Container container = null; for (RMContainer c : report.getLiveContainers()) { if (c.getContainerId().equals(containerId)) { container = c.getContainer();
this.rmContext.getScheduler().getSchedulerAppInfo(appAttemptId); if (schedulerAppReport != null) { rmContainers = schedulerAppReport.getLiveContainers();
@Override public SchedulerAppReport getSchedulerAppInfo( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return new SchedulerAppReport(attempt); }
this.rmContext.getScheduler().getSchedulerAppInfo(appAttemptId); if (schedulerAppReport != null) { rmContainers = schedulerAppReport.getLiveContainers();
@Override public SchedulerAppReport getSchedulerAppInfo( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return new SchedulerAppReport(attempt); }
String queue = appQueueMap.get(appAttemptId.getApplicationId()); SchedulerAppReport app = scheduler.getSchedulerAppInfo(appAttemptId); if (! app.getLiveContainers().isEmpty()) { // have 0 or 1 RMContainer rmc = app.getLiveContainers().iterator().next(); updateQueueMetrics(queue, rmc.getContainer().getResource().getMemory(),
this.rmContext.getScheduler().getSchedulerAppInfo(appAttemptId); if (schedulerAppReport != null) { rmContainers = schedulerAppReport.getLiveContainers();
String queue = appQueueMap.get(appAttemptId); SchedulerAppReport app = super.getSchedulerAppInfo(appAttemptId); if (! app.getLiveContainers().isEmpty()) { // have 0 or 1 RMContainer rmc = app.getLiveContainers().iterator().next(); updateQueueMetrics(queue, rmc.getContainer().getResource().getMemory(),
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()); } } }
when( rmContext.getScheduler().getSchedulerAppInfo(attemptId) .getLiveContainers()).thenReturn(rmContainers); ContainerStatus cs = mock(ContainerStatus.class); when(containerimpl.getFinishedStatus()).thenReturn(cs);
when( rmContext.getScheduler().getSchedulerAppInfo(attemptId) .getLiveContainers()).thenReturn(rmContainers); ContainerStatus cs = mock(ContainerStatus.class); when(containerimpl.completed()).thenReturn(false);
int releasedMemory = 0, releasedVCores = 0; if (status.getExitStatus() == ContainerExitStatus.SUCCESS) { for (RMContainer rmc : app.getLiveContainers()) { if (rmc.getContainerId() == containerId) { releasedMemory += rmc.getContainer().getResource().getMemory();
int releasedMemory = 0, releasedVCores = 0; if (status.getExitStatus() == ContainerExitStatus.SUCCESS) { for (RMContainer rmc : app.getLiveContainers()) { if (rmc.getContainerId() == containerId) { releasedMemory += rmc.getContainer().getResource().getMemory();
Assert.assertEquals(3, info.getLiveContainers().size()); scheduler.stop();
Assert.assertEquals(3, info.getLiveContainers().size()); scheduler.stop();