public synchronized void recoverContainer(RMContainer rmContainer) { // recover app scheduling info appSchedulingInfo.recoverContainer(rmContainer); if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } LOG.info("SchedulerAttempt " + getApplicationAttemptId() + " is recovering container " + rmContainer.getContainerId()); liveContainers.put(rmContainer.getContainerId(), rmContainer); Resources.addTo(currentConsumption, rmContainer.getContainer() .getResource()); // resourceLimit: updated when LeafQueue#recoverContainer#allocateResource // is called. // newlyAllocatedContainers.add(rmContainer); // schedulingOpportunities // lastScheduledContainer }
public synchronized void recoverContainer(RMContainer rmContainer) { // recover app scheduling info appSchedulingInfo.recoverContainer(rmContainer); if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } LOG.info("SchedulerAttempt " + getApplicationAttemptId() + " is recovering container " + rmContainer.getContainerId()); liveContainers.put(rmContainer.getContainerId(), rmContainer); Resources.addTo(currentConsumption, rmContainer.getContainer() .getResource()); // resourceLimit: updated when LeafQueue#recoverContainer#allocateResource // is called. // newlyAllocatedContainers.add(rmContainer); // schedulingOpportunities // lastScheduledContainer }
public void recoverContainer(SchedulerNode node, RMContainer rmContainer) { try { writeLock.lock(); // recover app scheduling info appSchedulingInfo.recoverContainer(rmContainer, node.getPartition()); if (rmContainer.getState().equals(RMContainerState.COMPLETED)) { return; } LOG.info("SchedulerAttempt " + getApplicationAttemptId() + " is recovering container " + rmContainer.getContainerId()); addRMContainer(rmContainer.getContainerId(), rmContainer); if (rmContainer.getExecutionType() == ExecutionType.GUARANTEED) { attemptResourceUsage.incUsed(node.getPartition(), rmContainer.getContainer().getResource()); } // resourceLimit: updated when LeafQueue#recoverContainer#allocateResource // is called. // newlyAllocatedContainers.add(rmContainer); // schedulingOpportunities // lastScheduledContainer } finally { writeLock.unlock(); } }