@Override public Collection<ContainerReport> run() throws Exception { return appBaseProt.getContainers(request).getContainerList(); } });
@Override public Collection<ContainerReport> run() throws Exception { return appBaseProt.getContainers(request).getContainerList(); } });
@Override public Collection<ContainerReport> run() throws Exception { return appBaseProt.getContainers(request).getContainerList(); } });
@Override public List<ContainerReport> getContainers( ApplicationAttemptId applicationAttemptId) throws YarnException, IOException { GetContainersRequest request = GetContainersRequest .newInstance(applicationAttemptId); GetContainersResponse response = ahsClient.getContainers(request); return response.getContainerList(); }
@Override protected List<ContainerReport> getContainersReport( GetContainersRequest request) throws YarnException, IOException { return rm.getClientRMService().getContainers(request).getContainerList(); }
@Override public List<ContainerReport> getContainers( ApplicationAttemptId applicationAttemptId) throws YarnException, IOException { GetContainersRequest request = GetContainersRequest .newInstance(applicationAttemptId); GetContainersResponse response = ahsClient.getContainers(request); return response.getContainerList(); }
@Override public Collection<ContainerReport> run() throws Exception { GetContainersRequest request = GetContainersRequest.newInstance(aaid); return appBaseProt.getContainers(request).getContainerList(); } });
@Override public List<ContainerReport> getContainers( ApplicationAttemptId applicationAttemptId) throws YarnException, IOException { GetContainersRequest request = GetContainersRequest .newInstance(applicationAttemptId); GetContainersResponse response = ahsClient.getContainers(request); return response.getContainerList(); }
@Override public List<ContainerReport> getContainers( ApplicationAttemptId applicationAttemptId) throws YarnException, IOException { GetContainersRequest request = GetContainersRequest .newInstance(applicationAttemptId); GetContainersResponse response = ahsClient.getContainers(request); return response.getContainerList(); }
@Override public Collection<ContainerReport> run() throws Exception { GetContainersRequest request = GetContainersRequest.newInstance(aaid); return appBaseProt.getContainers(request).getContainerList(); } });
@Override protected List<ContainerReport> getContainers( final GetContainersRequest request) throws YarnException, IOException { return rm.getClientRMService().getContainers(request).getContainerList(); }
@Override public Collection<ContainerReport> run() throws Exception { GetContainersRequest request = GetContainersRequest.newInstance(aaid); return appBaseProt.getContainers(request).getContainerList(); } });
request.setApplicationAttemptId(applicationAttemptId); GetContainersResponse response = rmClient.getContainers(request); containersForAttempt.addAll(response.getContainerList()); } catch (YarnException e) { if (e.getClass() != ApplicationNotFoundException.class
request.setApplicationAttemptId(applicationAttemptId); GetContainersResponse response = rmClient.getContainers(request); containersForAttempt.addAll(response.getContainerList()); } catch (YarnException e) { if (e.getClass() != ApplicationNotFoundException.class
GetContainersRequest request = GetContainersRequest.newInstance(aaid); containerReports = appBaseProt.getContainers(request).getContainerList(); } else { containerReports = callerUGI.doAs(
GetContainersRequest request = GetContainersRequest.newInstance(aaid); containerReports = appBaseProt.getContainers(request).getContainerList(); } else { containerReports = callerUGI.doAs(
GetContainersRequest request = GetContainersRequest.newInstance(aaid); containerReports = appBaseProt.getContainers(request).getContainerList(); } else { containerReports = callerUGI.doAs(
@Test public void testContainers() throws IOException, YarnException { ApplicationId appId = ApplicationId.newInstance(0, 1); ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(appId, 1); ContainerId containerId = ContainerId.newContainerId(appAttemptId, 1); ContainerId containerId1 = ContainerId.newContainerId(appAttemptId, 2); GetContainersRequest request = GetContainersRequest.newInstance(appAttemptId); GetContainersResponse response = clientService.getContainers(request); List<ContainerReport> containers = response.getContainerList(); Assert.assertNotNull(containers); Assert.assertEquals(containerId, containers.get(0).getContainerId()); Assert.assertEquals(containerId1, containers.get(1).getContainerId()); } }
@Test public void testGetContainers() throws YarnException, IOException { ClientRMService rmService = createRMService(); RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null); GetContainersRequest request = recordFactory .newRecordInstance(GetContainersRequest.class); ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance( ApplicationId.newInstance(123456, 1), 1); ContainerId containerId = ContainerId.newContainerId(attemptId, 1); request.setApplicationAttemptId(attemptId); try { GetContainersResponse response = rmService.getContainers(request); Assert.assertEquals(containerId, response.getContainerList().get(0) .getContainerId()); } catch (ApplicationNotFoundException ex) { Assert.fail(ex.getMessage()); } }
@Test public void testGetContainers() throws YarnException, IOException { ClientRMService rmService = createRMService(); RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null); GetContainersRequest request = recordFactory .newRecordInstance(GetContainersRequest.class); ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance( ApplicationId.newInstance(123456, 1), 1); ContainerId containerId = ContainerId.newContainerId(attemptId, 1); request.setApplicationAttemptId(attemptId); try { GetContainersResponse response = rmService.getContainers(request); Assert.assertEquals(containerId, response.getContainerList().get(0) .getContainerId()); } catch (ApplicationNotFoundException ex) { Assert.fail(ex.getMessage()); } }