@Override public List<SchedulingRequest> getPendingSchedulingRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllSchedulingRequests(); } return null; }
@Override public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; }
private void updateMetricsForAllocatedContainer(NodeType type, SchedulerNode node, Container containerAllocated) { QueueMetrics metrics = queue.getMetrics(); if (pending) { // once an allocation is done we assume the application is // running from scheduler's POV. pending = false; metrics.runAppAttempt(applicationId, user); } updateMetrics(applicationId, type, node, containerAllocated, user, queue); }
public synchronized void transferStateFromPreviousAttempt( SchedulerApplicationAttempt appAttempt) { this.liveContainers = appAttempt.getLiveContainersMap(); // this.reReservations = appAttempt.reReservations; this.currentConsumption = appAttempt.getCurrentConsumption(); this.resourceLimit = appAttempt.getResourceLimit(); // this.currentReservation = appAttempt.currentReservation; // this.newlyAllocatedContainers = appAttempt.newlyAllocatedContainers; // this.schedulingOpportunities = appAttempt.schedulingOpportunities; this.lastScheduledContainer = appAttempt.getLastScheduledContainer(); this.appSchedulingInfo .transferStateFromPreviousAppSchedulingInfo(appAttempt.appSchedulingInfo); }
@Override public Integer getValue() { if(scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAvailableMB(); } } }
@Override public Integer getValue() { if(scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAllocatedMB(); } } }
@Override public Integer getValue() { if(scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAllocatedVirtualCores(); } } }
@Override public Integer getValue() { if(scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAllocatedContainers(); } } }
@Override public Integer getValue() { if(scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAvailableVirtualCores(); } } }
@Override public Integer getValue() { if (scheduler == null || scheduler.getRootQueueMetrics() == null) { return 0; } else { return scheduler.getRootQueueMetrics().getAppsRunning(); } } }
@Override public RMContainer getRMContainer(ContainerId containerId) { SchedulerApplicationAttempt attempt = getCurrentAttemptForContainer(containerId); return (attempt == null) ? null : attempt.getRMContainer(containerId); }
public void stop(RMAppState rmAppFinalState) { queue.getMetrics().finishApp(user, rmAppFinalState); }
@Override public long generateContainerId() { return appAttempt.getAppSchedulingInfo().getNewContainerId(); } });
/** * Update schedulerHealth information. * @param releasedResources Reference resource object for completed containers * @param releasedContainers Count of released containers */ protected void updateSchedulerHealthInformation(Resource releasedResources, int releasedContainers) { schedulerHealth.updateSchedulerReleaseDetails(getLastNodeUpdateTime(), releasedResources); schedulerHealth.updateSchedulerReleaseCounts(releasedContainers); }
public void decPendingResource(String partition, Resource toDecrease) { queue.decPendingResource(partition, toDecrease); appResourceUsage.decPending(partition, toDecrease); }
@Override public Resource getNormalizedResource(Resource requestedResource, Resource maxResourceCapability) { return SchedulerUtils.getNormalizedResource(requestedResource, getResourceCalculator(), getMinimumResourceCapability(), maxResourceCapability, getMinimumResourceCapability()); }
public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; } }
@Override public RMContainer getRMContainer(ContainerId containerId) { SchedulerApplicationAttempt attempt = getCurrentAttemptForContainer(containerId); return (attempt == null) ? null : attempt.getRMContainer(containerId); }
public List<ResourceRequest> getPendingResourceRequestsForAttempt( ApplicationAttemptId attemptId) { SchedulerApplicationAttempt attempt = getApplicationAttempt(attemptId); if (attempt != null) { return attempt.getAppSchedulingInfo().getAllResourceRequests(); } return null; } }
@Override public RMContainer getRMContainer(ContainerId containerId) { SchedulerApplicationAttempt attempt = getCurrentAttemptForContainer(containerId); return (attempt == null) ? null : attempt.getRMContainer(containerId); }