|
@@ -107,8 +107,6 @@ public class LeafQueue implements CSQueue {
|
|
|
private final Resource maximumAllocation;
|
|
|
private final float minimumAllocationFactor;
|
|
|
|
|
|
- private RMContainerTokenSecretManager containerTokenSecretManager;
|
|
|
-
|
|
|
private Map<String, User> users = new HashMap<String, User>();
|
|
|
|
|
|
private final QueueMetrics metrics;
|
|
@@ -149,7 +147,6 @@ public class LeafQueue implements CSQueue {
|
|
|
Resources.ratio(resourceCalculator,
|
|
|
Resources.subtract(maximumAllocation, minimumAllocation),
|
|
|
maximumAllocation);
|
|
|
- this.containerTokenSecretManager = cs.getContainerTokenSecretManager();
|
|
|
|
|
|
float capacity =
|
|
|
(float)cs.getConfiguration().getCapacity(getQueuePath()) / 100;
|
|
@@ -560,7 +557,7 @@ public class LeafQueue implements CSQueue {
|
|
|
return queueName + ": " +
|
|
|
"capacity=" + capacity + ", " +
|
|
|
"absoluteCapacity=" + absoluteCapacity + ", " +
|
|
|
- "usedResources=" + usedResources +
|
|
|
+ "usedResources=" + usedResources + ", " +
|
|
|
"usedCapacity=" + getUsedCapacity() + ", " +
|
|
|
"absoluteUsedCapacity=" + getAbsoluteUsedCapacity() + ", " +
|
|
|
"numApps=" + getNumApplications() + ", " +
|
|
@@ -949,15 +946,16 @@ public class LeafQueue implements CSQueue {
|
|
|
Resources.add(usedResources, required),
|
|
|
clusterResource);
|
|
|
if (potentialNewCapacity > absoluteMaxCapacity) {
|
|
|
- LOG.info(getQueueName() +
|
|
|
- " usedResources: " + usedResources +
|
|
|
- " clusterResources: " + clusterResource +
|
|
|
- " currentCapacity " +
|
|
|
- Resources.divide(resourceCalculator, clusterResource,
|
|
|
- usedResources, clusterResource) +
|
|
|
- " required " + required +
|
|
|
- " potentialNewCapacity: " + potentialNewCapacity + " ( " +
|
|
|
- " max-capacity: " + absoluteMaxCapacity + ")");
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug(getQueueName()
|
|
|
+ + " usedResources: " + usedResources
|
|
|
+ + " clusterResources: " + clusterResource
|
|
|
+ + " currentCapacity "
|
|
|
+ + Resources.divide(resourceCalculator, clusterResource,
|
|
|
+ usedResources, clusterResource) + " required " + required
|
|
|
+ + " potentialNewCapacity: " + potentialNewCapacity + " ( "
|
|
|
+ + " max-capacity: " + absoluteMaxCapacity + ")");
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
@@ -1300,7 +1298,7 @@ public class LeafQueue implements CSQueue {
|
|
|
ResourceRequest request, NodeType type, RMContainer rmContainer) {
|
|
|
if (LOG.isDebugEnabled()) {
|
|
|
LOG.debug("assignContainers: node=" + node.getNodeName()
|
|
|
- + " application=" + application.getApplicationId().getId()
|
|
|
+ + " application=" + application.getApplicationId()
|
|
|
+ " priority=" + priority.getPriority()
|
|
|
+ " request=" + request + " type=" + type);
|
|
|
}
|
|
@@ -1352,14 +1350,10 @@ public class LeafQueue implements CSQueue {
|
|
|
allocatedContainer);
|
|
|
|
|
|
LOG.info("assignedContainer" +
|
|
|
- " application=" + application.getApplicationId() +
|
|
|
+ " application attempt=" + application.getApplicationAttemptId() +
|
|
|
" container=" + container +
|
|
|
- " containerId=" + container.getId() +
|
|
|
" queue=" + this +
|
|
|
- " usedCapacity=" + getUsedCapacity() +
|
|
|
- " absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
|
|
|
- " used=" + usedResources +
|
|
|
- " cluster=" + clusterResource);
|
|
|
+ " clusterResource=" + clusterResource);
|
|
|
|
|
|
return container.getResource();
|
|
|
} else {
|
|
@@ -1367,13 +1361,11 @@ public class LeafQueue implements CSQueue {
|
|
|
reserve(application, priority, node, rmContainer, container);
|
|
|
|
|
|
LOG.info("Reserved container " +
|
|
|
- " application=" + application.getApplicationId() +
|
|
|
+ " application attempt=" + application.getApplicationAttemptId() +
|
|
|
" resource=" + request.getCapability() +
|
|
|
" queue=" + this.toString() +
|
|
|
- " usedCapacity=" + getUsedCapacity() +
|
|
|
- " absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
|
|
|
- " used=" + usedResources +
|
|
|
- " cluster=" + clusterResource);
|
|
|
+ " node=" + node +
|
|
|
+ " clusterResource=" + clusterResource);
|
|
|
|
|
|
return request.getCapability();
|
|
|
}
|
|
@@ -1440,11 +1432,7 @@ public class LeafQueue implements CSQueue {
|
|
|
application, container.getResource());
|
|
|
LOG.info("completedContainer" +
|
|
|
" container=" + container +
|
|
|
- " resource=" + container.getResource() +
|
|
|
" queue=" + this +
|
|
|
- " usedCapacity=" + getUsedCapacity() +
|
|
|
- " absoluteUsedCapacity=" + getAbsoluteUsedCapacity() +
|
|
|
- " used=" + usedResources +
|
|
|
" cluster=" + clusterResource);
|
|
|
}
|
|
|
}
|