|
@@ -898,6 +898,9 @@ public class FairScheduler extends
|
|
clusterResource, minimumAllocation, getMaximumResourceCapability(),
|
|
clusterResource, minimumAllocation, getMaximumResourceCapability(),
|
|
incrAllocation);
|
|
incrAllocation);
|
|
|
|
|
|
|
|
+ // Record container allocation start time
|
|
|
|
+ application.recordContainerRequestTime(getClock().getTime());
|
|
|
|
+
|
|
// Set amResource for this app
|
|
// Set amResource for this app
|
|
if (!application.getUnmanagedAM() && ask.size() == 1
|
|
if (!application.getUnmanagedAM() && ask.size() == 1
|
|
&& application.getLiveContainers().isEmpty()) {
|
|
&& application.getLiveContainers().isEmpty()) {
|
|
@@ -931,7 +934,7 @@ public class FairScheduler extends
|
|
LOG.debug("Preempting " + application.getPreemptionContainers().size()
|
|
LOG.debug("Preempting " + application.getPreemptionContainers().size()
|
|
+ " container(s)");
|
|
+ " container(s)");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
Set<ContainerId> preemptionContainerIds = new HashSet<ContainerId>();
|
|
Set<ContainerId> preemptionContainerIds = new HashSet<ContainerId>();
|
|
for (RMContainer container : application.getPreemptionContainers()) {
|
|
for (RMContainer container : application.getPreemptionContainers()) {
|
|
preemptionContainerIds.add(container.getContainerId());
|
|
preemptionContainerIds.add(container.getContainerId());
|
|
@@ -940,6 +943,12 @@ public class FairScheduler extends
|
|
application.updateBlacklist(blacklistAdditions, blacklistRemovals);
|
|
application.updateBlacklist(blacklistAdditions, blacklistRemovals);
|
|
ContainersAndNMTokensAllocation allocation =
|
|
ContainersAndNMTokensAllocation allocation =
|
|
application.pullNewlyAllocatedContainersAndNMTokens();
|
|
application.pullNewlyAllocatedContainersAndNMTokens();
|
|
|
|
+
|
|
|
|
+ // Record container allocation time
|
|
|
|
+ if (!(allocation.getContainerList().isEmpty())) {
|
|
|
|
+ application.recordContainerAllocationTime(getClock().getTime());
|
|
|
|
+ }
|
|
|
|
+
|
|
Resource headroom = application.getHeadroom();
|
|
Resource headroom = application.getHeadroom();
|
|
application.setApplicationHeadroomForMetrics(headroom);
|
|
application.setApplicationHeadroomForMetrics(headroom);
|
|
return new Allocation(allocation.getContainerList(), headroom,
|
|
return new Allocation(allocation.getContainerList(), headroom,
|