public FSAppAttempt getSchedulerApp(ApplicationAttemptId appAttemptId) { return super.getApplicationAttempt(appAttemptId); }
@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 ApplicationResourceUsageReport getAppResourceUsageReport( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return attempt.getResourceUsageReport(); }
@Override public ApplicationResourceUsageReport getAppResourceUsageReport( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return attempt.getResourceUsageReport(); }
@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); }
@Lock(Lock.NoLock.class) @VisibleForTesting @Override public FiCaSchedulerApp getApplicationAttempt( ApplicationAttemptId applicationAttemptId) { return super.getApplicationAttempt(applicationAttemptId); }
@Override public Set<String> getBlacklistedNodes() { if (scheduler instanceof AbstractYarnScheduler) { AbstractYarnScheduler ayScheduler = (AbstractYarnScheduler) scheduler; SchedulerApplicationAttempt attempt = ayScheduler.getApplicationAttempt(applicationAttemptId); if (attempt != null) { return attempt.getBlacklistedNodes(); } } return Collections.emptySet(); }
@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 ApplicationResourceUsageReport getAppResourceUsageReport( ApplicationAttemptId appAttemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId); if (attempt == null) { if (LOG.isDebugEnabled()) { LOG.debug("Request for appInfo of unknown attempt " + appAttemptId); } return null; } return attempt.getResourceUsageReport(); }
@Lock(Lock.NoLock.class) @VisibleForTesting @Override public FiCaSchedulerApp getApplicationAttempt( ApplicationAttemptId applicationAttemptId) { return super.getApplicationAttempt(applicationAttemptId); }
@Lock(Lock.NoLock.class) @VisibleForTesting @Override public FiCaSchedulerApp getApplicationAttempt( ApplicationAttemptId applicationAttemptId) { return super.getApplicationAttempt(applicationAttemptId); }
public T getCurrentAttemptForContainer(ContainerId containerId) { return getApplicationAttempt(containerId.getApplicationAttemptId()); }
@Override public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; }
@Override public List<SchedulingRequest> getPendingSchedulingRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllSchedulingRequests(); } return null; }
public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; } }
public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; } }
public static Set<String> getBlacklistedNodes(ResourceManager rm, ApplicationAttemptId appid) { if (rm.getResourceScheduler() instanceof AbstractYarnScheduler) { AbstractYarnScheduler ayScheduler = (AbstractYarnScheduler) rm.getResourceScheduler(); SchedulerApplicationAttempt attempt = ayScheduler.getApplicationAttempt(appid); if (attempt != null) { return attempt.getBlacklistedNodes(); } } return null; } }
public Boolean get() { // release cache is cleaned up and previous running container is not // recovered return scheduler.getApplicationAttempt(am1.getApplicationAttemptId()) .getPendingRelease().isEmpty() && scheduler.getRMContainer(runningContainer) == null; } }, 1000, 20000);
public Boolean get() { // release cache is cleaned up and previous running container is not // recovered return scheduler.getApplicationAttempt(am1.getApplicationAttemptId()) .getPendingRelease().isEmpty() && scheduler.getRMContainer(runningContainer) == null; } }, 1000, 20000);
static void verifyAppInfoJson(JSONObject info, RMApp app, ResourceManager rm) throws JSONException { int expectedNumberOfElements = getExpectedNumberOfElements(app); assertEquals("incorrect number of elements", expectedNumberOfElements, info.length()); AppInfoJsonVerifications.verify(info, app); JSONArray resourceRequests = info.getJSONArray("resourceRequests"); JSONObject requestInfo = resourceRequests.getJSONObject(0); ResourceRequest rr = ((AbstractYarnScheduler) rm.getRMContext().getScheduler()) .getApplicationAttempt(app.getCurrentAppAttempt().getAppAttemptId()) .getAppSchedulingInfo().getAllResourceRequests().get(0); ResourceRequestsJsonVerifications.verifyWithCustomResourceTypes(requestInfo, rr, CustomResourceTypesConfigurationProvider.getCustomResourceTypes()); }