From 46f90581641feec37e285964df983d221bee5e1d Mon Sep 17 00:00:00 2001 From: Miklos Szegedi Date: Wed, 20 Jun 2018 11:58:18 -0700 Subject: [PATCH] YARN-8441. Typo in CSQueueUtils local variable names: queueGuranteedResource. Contributed by Szilard Nemeth. --- .../scheduler/capacity/CSQueueUtils.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java index 0dfce83413..b5edbf7c61 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueueUtils.java @@ -184,7 +184,7 @@ public static void updateUsedCapacity(final ResourceCalculator rc, if (Resources.greaterThan(rc, totalPartitionResource, totalPartitionResource, Resources.none())) { - Resource queueGuranteedResource = childQueue + Resource queueGuaranteedResource = childQueue .getEffectiveCapacity(nodePartition); //TODO : Modify below code to support Absolute Resource configurations @@ -204,14 +204,14 @@ public static void updateUsedCapacity(final ResourceCalculator rc, QueueCapacities leafQueueTemplateCapacities = parentQueue .getLeafQueueTemplate() .getQueueCapacities(); - queueGuranteedResource = Resources.multiply(totalPartitionResource, + queueGuaranteedResource = Resources.multiply(totalPartitionResource, leafQueueTemplateCapacities.getAbsoluteCapacity (nodePartition)); } // make queueGuranteed >= minimum_allocation to avoid divided by 0. - queueGuranteedResource = - Resources.max(rc, totalPartitionResource, queueGuranteedResource, + queueGuaranteedResource = + Resources.max(rc, totalPartitionResource, queueGuaranteedResource, minimumAllocation); Resource usedResource = queueResourceUsage.getUsed(nodePartition); @@ -220,12 +220,12 @@ public static void updateUsedCapacity(final ResourceCalculator rc, totalPartitionResource); usedCapacity = Resources.divide(rc, totalPartitionResource, usedResource, - queueGuranteedResource); + queueGuaranteedResource); Resource resResource = queueResourceUsage.getReserved(nodePartition); reservedCapacity = Resources.divide(rc, totalPartitionResource, resResource, - queueGuranteedResource); + queueGuaranteedResource); absoluteReservedCapacity = Resources.divide(rc, totalPartitionResource, resResource, totalPartitionResource); @@ -258,16 +258,16 @@ private static Resource getMaxAvailableResourceToQueue( for (String partition : nodeLabels) { // Calculate guaranteed resource for a label in a queue by below logic. // (total label resource) * (absolute capacity of label in that queue) - Resource queueGuranteedResource = queue.getEffectiveCapacity(partition); + Resource queueGuaranteedResource = queue.getEffectiveCapacity(partition); // Available resource in queue for a specific label will be calculated as // {(guaranteed resource for a label in a queue) - // (resource usage of that label in the queue)} // Finally accumulate this available resource to get total. Resource available = (Resources.greaterThan(rc, cluster, - queueGuranteedResource, + queueGuaranteedResource, queue.getQueueResourceUsage().getUsed(partition))) ? Resources - .componentwiseMax(Resources.subtractFrom(queueGuranteedResource, + .componentwiseMax(Resources.subtractFrom(queueGuaranteedResource, queue.getQueueResourceUsage().getUsed(partition)), Resources .none()) : Resources.none(); Resources.addTo(totalAvailableResource, available);