@Override public ApplicationReport getApplicationReport(ApplicationId appId) throws YarnException, IOException { ApplicationReport report = yarnClient.getApplicationReport(appId); if (report.getYarnApplicationState() == null) { // The state can be null when the ResourceManager does not know about the app but the YARN // application history server has an incomplete entry for it. Treat this scenario as if the // application does not exist, since the final app status cannot be determined. This also // matches the behavior for this scenario if the history server was not configured. throw new ApplicationNotFoundException("YARN reports no state for application " + appId); } return report; }
@Override public int actionStop(String serviceName, boolean waitForAppStopped) throws YarnException, IOException { if (serviceName == null) { throw new NullPointerException(); } if (serviceName.equals("jenkins")) { return EXIT_SUCCESS; } else if (serviceName.equals("jenkins-second-stop")) { return EXIT_COMMAND_ARGUMENT_ERROR; } else { throw new ApplicationNotFoundException(""); } }
@Override public ApplicationId actionStartAndGetId(String serviceName) throws YarnException, IOException { if (serviceName != null && serviceName.equals("jenkins")) { ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(), 1); serviceAppId.put(serviceName, appId); return appId; } else { throw new ApplicationNotFoundException(""); } }
private ApplicationReportExt getApplication(ApplicationId appId, ApplicationReportField field) throws YarnException, IOException { TimelineEntity entity = timelineDataManager.getEntity( ApplicationMetricsConstants.ENTITY_TYPE, appId.toString(), EnumSet.allOf(Field.class), UserGroupInformation.getLoginUser()); if (entity == null) { throw new ApplicationNotFoundException("The entity for application " + appId + " doesn't exist in the timeline store"); } else { return generateApplicationReport(entity, field); } }
private ApplicationReportExt getApplication(ApplicationId appId, ApplicationReportField field) throws YarnException, IOException { TimelineEntity entity = timelineDataManager.getEntity( ApplicationMetricsConstants.ENTITY_TYPE, appId.toString(), EnumSet.allOf(Field.class), UserGroupInformation.getLoginUser()); if (entity == null) { throw new ApplicationNotFoundException("The entity for application " + appId + " doesn't exist in the timeline store"); } else { return generateApplicationReport(entity, field); } }
private ApplicationReportExt getApplication(ApplicationId appId, ApplicationReportField field) throws YarnException, IOException { TimelineEntity entity = timelineDataManager.getEntity( ApplicationMetricsConstants.ENTITY_TYPE, appId.toString(), EnumSet.allOf(Field.class), UserGroupInformation.getLoginUser()); if (entity == null) { throw new ApplicationNotFoundException("The entity for application " + appId + " doesn't exist in the timeline store"); } else { return generateApplicationReport(entity, field); } }
private ResourceMgrDelegate getRMDelegate() throws IOException { ResourceMgrDelegate rm = mock(ResourceMgrDelegate.class); try { ApplicationId appId = jobId.getAppId(); when(rm.getApplicationReport(appId)). thenThrow(new ApplicationNotFoundException(appId + " not found")); } catch (YarnException e) { throw new IOException(e); } return rm; }
throw new ApplicationNotFoundException("Application with id '" + appId + "' doesn't exist in RM.");
ApplicationId applicationId = request.getApplicationId(); if (applicationId == null) { throw new ApplicationNotFoundException("Invalid application id: null"); throw new ApplicationNotFoundException("Application with id '" + applicationId + "' doesn't exist in RM. Please check " + "that the job submission was successful.");
public void testHelper(boolean isAHSEnabled) throws YarnException, IOException { conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, isAHSEnabled); appManager = Mockito.mock(ApplicationClientProtocol.class); Mockito.when(appManager .getApplicationReport(Mockito.any(GetApplicationReportRequest.class))) .thenThrow(new ApplicationNotFoundException(appNotFoundExceptionMsg)); fetcher = new AppReportFetcherForTest(conf, appManager); ApplicationId appId = ApplicationId.newInstance(0,0); fetcher.getApplicationReport(appId); }
public void testHelper(boolean isAHSEnabled) throws YarnException, IOException { conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, isAHSEnabled); appManager = Mockito.mock(ApplicationClientProtocol.class); Mockito.when(appManager .getApplicationReport(Mockito.any(GetApplicationReportRequest.class))) .thenThrow(new ApplicationNotFoundException(appNotFoundExceptionMsg)); fetcher = new AppReportFetcherForTest(conf, appManager); ApplicationId appId = ApplicationId.newInstance(0,0); fetcher.getApplicationReport(appId); }
throw new ApplicationNotFoundException("Application with id '" + applicationId + "' doesn't exist in RM.");
throw new ApplicationNotFoundException("Application with id '" + applicationId + "' doesn't exist in RM.");
throw new ApplicationNotFoundException("Application with id '" + applicationId + "' doesn't exist in RM. " + "Please check that the job "
@Override public KillApplicationResponse forceKillApplication( KillApplicationRequest request) throws YarnException, IOException { validateRunning(); ApplicationId appId = null; if (request.getApplicationId() != null) { appId = request.getApplicationId(); if (!applicationMap.remove(appId)) { throw new ApplicationNotFoundException( "Trying to kill an absent application: " + appId); } } LOG.info("Force killing application: " + appId); return KillApplicationResponse.newInstance(true); }
throw new ApplicationNotFoundException("Application with id '" + request.getApplicationAttemptId().getApplicationId() + "' doesn't exist in RM.");
throw new ApplicationNotFoundException("Application with id '" + request.getApplicationAttemptId().getApplicationId() + "' doesn't exist in RM.");
throw new ApplicationNotFoundException("Application with id '" + appId + "' doesn't exist in RM.");
return result; } else if (answer == 4) { throw new ApplicationNotFoundException("Application is not found"); } else if (answer == 5) {
return result; } else if (answer == 4) { throw new ApplicationNotFoundException("Application is not found"); } else if (answer == 5) {