diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java index 1f47b5f..d5bf7dc 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/monitor/capacity/ProportionalCapacityPreemptionPolicy.java @@ -886,6 +886,7 @@ private TempQueuePerPartition cloneQueues(CSQueue curQueue, TempQueuePerPartition subq = cloneQueues(c, partitionResource, partitionToLookAt); Resources.addTo(childrensPreemptable, subq.preemptableExtra); + Resources.addTo(childrensPreemptable, subq.childrenCollectivePreemptable); ret.addChild(subq); } // untouchableExtra = max(extra - childrenPreemptable, 0) @@ -896,6 +897,7 @@ private TempQueuePerPartition cloneQueues(CSQueue curQueue, ret.untouchableExtra = Resources.subtractFrom(extra, childrensPreemptable); } + ret.childrenCollectivePreemptable = childrensPreemptable; } } addTempQueuePartition(ret); @@ -969,6 +971,7 @@ private TempQueuePerPartition getQueueByPartition(String queueName, Resource actuallyPreempted; Resource untouchableExtra; Resource preemptableExtra; + Resource childrenCollectivePreemptable; double normalizedGuarantee; @@ -993,6 +996,7 @@ private TempQueuePerPartition getQueueByPartition(String queueName, this.preemptableExtra = Resource.newInstance(0, 0); this.preemptionDisabled = preemptionDisabled; this.partition = partition; + this.childrenCollectivePreemptable=Resource.newInstance(0, 0); } public void setLeafQueue(LeafQueue l){ @@ -1051,6 +1055,7 @@ public String toString() { .append(" ACTUAL_PREEMPT: ").append(actuallyPreempted) .append(" UNTOUCHABLE: ").append(untouchableExtra) .append(" PREEMPTABLE: ").append(preemptableExtra) + .append(" CHILDERNPREEMPTABLE: ").append(childrenCollectivePreemptable) .append("\n"); return sb.toString();