public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnRemoteException { if (clientResourceManager == null) throw new IllegalStateException( "Cannot query for a report without first connecting!"); GetApplicationReportRequest req = Records .newRecord(GetApplicationReportRequest.class); req.setApplicationId(appId); return clientResourceManager.getApplicationReport(req).getApplicationReport(); }
@Override public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnException, IOException { GetApplicationReportRequest request = GetApplicationReportRequest .newInstance(appId); GetApplicationReportResponse response = ahsClient .getApplicationReport(request); return response.getApplicationReport(); }
@Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationReportResponse response = GetApplicationReportResponse.newInstance(history .getApplication(applicationId)); return response; } catch (IOException e) { LOG.error(e.getMessage(), e); throw e; } }
@Test public void testNonExistingApplicationReport() throws YarnException { RMContext rmContext = mock(RMContext.class); when(rmContext.getRMApps()).thenReturn( new ConcurrentHashMap<ApplicationId, RMApp>()); ClientRMService rmService = new ClientRMService(rmContext, null, null, null, null, null); RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null); GetApplicationReportRequest request = recordFactory .newRecordInstance(GetApplicationReportRequest.class); request.setApplicationId(ApplicationId.newInstance(0, 0)); try { rmService.getApplicationReport(request); Assert.fail(); } catch (ApplicationNotFoundException ex) { Assert.assertEquals(ex.getMessage(), "Application with id '" + request.getApplicationId() + "' doesn't exist in RM."); } }
@Test public void testNonExistingApplicationReport() throws YarnException { RMContext rmContext = mock(RMContext.class); when(rmContext.getRMApps()).thenReturn( new ConcurrentHashMap<ApplicationId, RMApp>()); ClientRMService rmService = new ClientRMService(rmContext, null, null, null, null, null); RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null); GetApplicationReportRequest request = recordFactory .newRecordInstance(GetApplicationReportRequest.class); request.setApplicationId(ApplicationId.newInstance(0, 0)); try { rmService.getApplicationReport(request); Assert.fail(); } catch (ApplicationNotFoundException ex) { Assert.assertEquals(ex.getMessage(), "Application with id '" + request.getApplicationId() + "' doesn't exist in RM. Please check that the " + "job submission was successful."); } }
@Public @Stable public static GetApplicationReportRequest newInstance( ApplicationId applicationId) { GetApplicationReportRequest request = Records.newRecord(GetApplicationReportRequest.class); request.setApplicationId(applicationId); return request; }
@Override public ApplicationReport run() throws Exception { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); return appBaseProt.getApplicationReport(request).getApplicationReport(); } });
@Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationReportResponse response = GetApplicationReportResponse.newInstance(history .getApplication(applicationId)); return response; } catch (IOException e) { LOG.error(e.getMessage(), e); throw e; } }
@Public @Stable public static GetApplicationReportRequest newInstance( ApplicationId applicationId) { GetApplicationReportRequest request = Records.newRecord(GetApplicationReportRequest.class); request.setApplicationId(applicationId); return request; }
@Override public ApplicationReport run() throws Exception { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); return appBaseProt.getApplicationReport(request).getApplicationReport(); } });
@Override public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException, IOException { ApplicationId applicationId = request.getApplicationId(); try { GetApplicationReportResponse response = GetApplicationReportResponse.newInstance(history .getApplication(applicationId)); return response; } catch (IOException e) { LOG.error(e.getMessage(), e); throw e; } }
@Public @Stable public static GetApplicationReportRequest newInstance( ApplicationId applicationId) { GetApplicationReportRequest request = Records.newRecord(GetApplicationReportRequest.class); request.setApplicationId(applicationId); return request; }
@Override public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnException, IOException { GetApplicationReportRequest request = GetApplicationReportRequest .newInstance(appId); GetApplicationReportResponse response = ahsClient .getApplicationReport(request); return response.getApplicationReport(); }
if (request == null || request.getApplicationId() == null) { routerMetrics.incrAppsFailedRetrieved(); RouterServerUtil.logAndThrowException( .getApplicationHomeSubCluster(request.getApplicationId()); } catch (YarnException e) { routerMetrics.incrAppsFailedRetrieved(); RouterServerUtil .logAndThrowException("Application " + request.getApplicationId() + " does not exist in FederationStateStore", e); routerMetrics.incrAppsFailedRetrieved(); LOG.error("Unable to get the application report for " + request.getApplicationId() + "to SubCluster " + subClusterId.getId(), e); throw e; + "the application " + request.getApplicationId() + " to SubCluster " + subClusterId.getId());
@Public @Stable public static GetApplicationReportRequest newInstance( ApplicationId applicationId) { GetApplicationReportRequest request = Records.newRecord(GetApplicationReportRequest.class); request.setApplicationId(applicationId); return request; }
@Override public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnException, IOException { GetApplicationReportRequest request = GetApplicationReportRequest .newInstance(appId); GetApplicationReportResponse response = ahsClient .getApplicationReport(request); return response.getApplicationReport(); }
public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId();
@Override public ApplicationReport doInYarn(ApplicationClientProtocol proxy) throws YarnException, IOException { GetApplicationReportRequest request = Records.newRecord(GetApplicationReportRequest.class); request.setApplicationId(applicationId); return proxy.getApplicationReport(request).getApplicationReport(); } });
@Override public ApplicationReport run() throws Exception { GetApplicationReportRequest request = GetApplicationReportRequest.newInstance(id); return appBaseProt.getApplicationReport(request).getApplicationReport(); } });
public GetApplicationReportResponse getApplicationReport( GetApplicationReportRequest request) throws YarnException { ApplicationId applicationId = request.getApplicationId();