This is an automated email from the ASF dual-hosted git repository. bteke pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new 077263d9f320 YARN-11608. Fix QueueCapacityVectorInfo NPE when accessible labels config is used. (#6250) 077263d9f320 is described below commit 077263d9f3205b8bdc62467271322c662570e5c5 Author: Benjamin Teke <brumi1...@users.noreply.github.com> AuthorDate: Mon Nov 6 10:11:14 2023 +0100 YARN-11608. Fix QueueCapacityVectorInfo NPE when accessible labels config is used. (#6250) Co-authored-by: Benjamin Teke <bt...@cloudera.com> --- .../webapp/dao/QueueCapacitiesInfo.java | 7 +- .../webapp/TestRMWebServicesCapacitySched.java | 1 + .../scheduler-response-NodeLabelDefaultAPI.xml | 260 ++++++++++++++++++++- .../scheduler-response-PerUserResources.json | 248 +++++++++++++++++++- .../webapp/scheduler-response-PerUserResources.xml | 260 ++++++++++++++++++++- .../test/resources/webapp/scheduler-response.json | 248 +++++++++++++++++++- .../test/resources/webapp/scheduler-response.xml | 260 ++++++++++++++++++++- 7 files changed, 1277 insertions(+), 7 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/webapp/dao/QueueCapacitiesInfo.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/QueueCapacitiesInfo.java index 293966b5b860..3f42a626163c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/QueueCapacitiesInfo.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/QueueCapacitiesInfo.java @@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueResourceQuotas; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueueCapacities; +import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueueCapacityVector; /** * DAO which wraps PartitionQueueCapacitiesInfo applicable for a queue @@ -57,8 +58,10 @@ public class QueueCapacitiesInfo { float weight; float normalizedWeight; for (String partitionName : capacities.getExistingNodeLabels()) { - queueCapacityVectorInfo = new QueueCapacityVectorInfo( - queue.getConfiguredCapacityVector(partitionName)); + QueueCapacityVector queueCapacityVector = queue.getConfiguredCapacityVector(partitionName); + queueCapacityVectorInfo = queueCapacityVector == null ? + new QueueCapacityVectorInfo(new QueueCapacityVector()) : + new QueueCapacityVectorInfo(queue.getConfiguredCapacityVector(partitionName)); usedCapacity = capacities.getUsedCapacity(partitionName) * 100; capacity = capacities.getCapacity(partitionName) * 100; maxCapacity = capacities.getMaximumCapacity(partitionName); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java index 19e58c018fcf..83b4578b4800 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java @@ -150,6 +150,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase { conf.set("yarn.scheduler.capacity.legacy-queue-mode.enabled", String.valueOf(legacyQueueMode)); conf.set("yarn.scheduler.capacity.root.queues", "a, b, c"); conf.set("yarn.scheduler.capacity.root.a.capacity", "12.5"); + conf.set("yarn.scheduler.capacity.root.a.accessible-node-labels", "root-a-default-label"); conf.set("yarn.scheduler.capacity.root.a.maximum-capacity", "50"); conf.set("yarn.scheduler.capacity.root.a.max-parallel-app", "42"); conf.set("yarn.scheduler.capacity.root.b.capacity", "50"); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-NodeLabelDefaultAPI.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-NodeLabelDefaultAPI.xml index d91322721b9d..4dfa5d924667 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-NodeLabelDefaultAPI.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-NodeLabelDefaultAPI.xml @@ -61,7 +61,7 @@ </resourceInformations> </resourcesUsed> <hideReservationQueues>false</hideReservationQueues> - <nodeLabels>*</nodeLabels> + <nodeLabels>root-a-default-label</nodeLabels> <allocatedContainers>0</allocatedContainers> <reservedContainers>0</reservedContainers> <pendingContainers>0</pendingContainers> @@ -185,6 +185,117 @@ </resourceInformations> </effectiveMaxResource> </queueCapacitiesByPartition> + <queueCapacitiesByPartition> + <partitionName>root-a-default-label</partitionName> + <queueCapacityVectorInfo> + <configuredCapacityVector>[]</configuredCapacityVector> + </queueCapacityVectorInfo> + <capacity>0.0</capacity> + <usedCapacity>0.0</usedCapacity> + <maxCapacity>100.0</maxCapacity> + <absoluteCapacity>0.0</absoluteCapacity> + <absoluteUsedCapacity>0.0</absoluteUsedCapacity> + <absoluteMaxCapacity>0.0</absoluteMaxCapacity> + <maxAMLimitPercentage>0.0</maxAMLimitPercentage> + <weight>-1.0</weight> + <normalizedWeight>0.0</normalizedWeight> + <configuredMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMinResource> + <configuredMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMaxResource> + <effectiveMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMinResource> + <effectiveMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMaxResource> + </queueCapacitiesByPartition> </capacities> <resources> <resourceUsagesByPartition> @@ -334,6 +445,153 @@ </resourceInformations> </userAmLimit> </resourceUsagesByPartition> + <resourceUsagesByPartition> + <partitionName>root-a-default-label</partitionName> + <used> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </used> + <reserved> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </reserved> + <pending> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </pending> + <amUsed> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amUsed> + <amLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amLimit> + <userAmLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </userAmLimit> + </resourceUsagesByPartition> </resources> <minEffectiveCapacity> <memory>4096</memory> diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.json index 7869b3868ddb..94976d796cd4 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.json +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.json @@ -62,7 +62,7 @@ } }, "hideReservationQueues" : false, - "nodeLabels" : [ "*" ], + "nodeLabels" : [ "root-a-default-label" ], "allocatedContainers" : 0, "reservedContainers" : 0, "pendingContainers" : 1, @@ -180,6 +180,112 @@ } ] } } + }, { + "partitionName" : "root-a-default-label", + "queueCapacityVectorInfo" : { + "configuredCapacityVector" : "[]" + }, + "capacity" : 0, + "usedCapacity" : 0, + "maxCapacity" : 100, + "absoluteCapacity" : 0, + "absoluteUsedCapacity" : 0, + "absoluteMaxCapacity" : 0, + "maxAMLimitPercentage" : 0, + "weight" : -1, + "normalizedWeight" : 0, + "configuredMinResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "configuredMaxResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "effectiveMinResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "effectiveMaxResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + } } ] }, "resources" : { @@ -323,6 +429,146 @@ } ] } } + }, { + "partitionName" : "root-a-default-label", + "used" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "reserved" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "pending" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "amUsed" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "amLimit" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "userAmLimit" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + } } ] }, "minEffectiveCapacity" : { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.xml index d75879059df3..ca4e6901a5c6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response-PerUserResources.xml @@ -61,7 +61,7 @@ </resourceInformations> </resourcesUsed> <hideReservationQueues>false</hideReservationQueues> - <nodeLabels>*</nodeLabels> + <nodeLabels>root-a-default-label</nodeLabels> <allocatedContainers>0</allocatedContainers> <reservedContainers>0</reservedContainers> <pendingContainers>1</pendingContainers> @@ -185,6 +185,117 @@ </resourceInformations> </effectiveMaxResource> </queueCapacitiesByPartition> + <queueCapacitiesByPartition> + <partitionName>root-a-default-label</partitionName> + <queueCapacityVectorInfo> + <configuredCapacityVector>[]</configuredCapacityVector> + </queueCapacityVectorInfo> + <capacity>0.0</capacity> + <usedCapacity>0.0</usedCapacity> + <maxCapacity>100.0</maxCapacity> + <absoluteCapacity>0.0</absoluteCapacity> + <absoluteUsedCapacity>0.0</absoluteUsedCapacity> + <absoluteMaxCapacity>0.0</absoluteMaxCapacity> + <maxAMLimitPercentage>0.0</maxAMLimitPercentage> + <weight>-1.0</weight> + <normalizedWeight>0.0</normalizedWeight> + <configuredMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMinResource> + <configuredMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMaxResource> + <effectiveMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMinResource> + <effectiveMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMaxResource> + </queueCapacitiesByPartition> </capacities> <resources> <resourceUsagesByPartition> @@ -334,6 +445,153 @@ </resourceInformations> </userAmLimit> </resourceUsagesByPartition> + <resourceUsagesByPartition> + <partitionName>root-a-default-label</partitionName> + <used> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </used> + <reserved> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </reserved> + <pending> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </pending> + <amUsed> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amUsed> + <amLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amLimit> + <userAmLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </userAmLimit> + </resourceUsagesByPartition> </resources> <minEffectiveCapacity> <memory>4096</memory> diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.json b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.json index f44adf3af9b6..202f68107c22 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.json +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.json @@ -62,7 +62,7 @@ } }, "hideReservationQueues" : false, - "nodeLabels" : [ "*" ], + "nodeLabels" : [ "root-a-default-label" ], "allocatedContainers" : 0, "reservedContainers" : 0, "pendingContainers" : 0, @@ -180,6 +180,112 @@ } ] } } + }, { + "partitionName" : "root-a-default-label", + "queueCapacityVectorInfo" : { + "configuredCapacityVector" : "[]" + }, + "capacity" : 0, + "usedCapacity" : 0, + "maxCapacity" : 100, + "absoluteCapacity" : 0, + "absoluteUsedCapacity" : 0, + "absoluteMaxCapacity" : 0, + "maxAMLimitPercentage" : 0, + "weight" : -1, + "normalizedWeight" : 0, + "configuredMinResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "configuredMaxResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "effectiveMinResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "effectiveMaxResource" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 8192, + "minimumAllocation" : 1024, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 4, + "minimumAllocation" : 1, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + } } ] }, "resources" : { @@ -323,6 +429,146 @@ } ] } } + }, { + "partitionName" : "root-a-default-label", + "used" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "reserved" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "pending" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "amUsed" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "amLimit" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + }, + "userAmLimit" : { + "memory" : 0, + "vCores" : 0, + "resourceInformations" : { + "resourceInformation" : [ { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "memory-mb", + "resourceType" : "COUNTABLE", + "units" : "Mi", + "value" : 0 + }, { + "attributes" : { }, + "maximumAllocation" : 9223372036854775807, + "minimumAllocation" : 0, + "name" : "vcores", + "resourceType" : "COUNTABLE", + "units" : "", + "value" : 0 + } ] + } + } } ] }, "minEffectiveCapacity" : { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.xml index 91e06c9551c2..1742c7a76553 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/resources/webapp/scheduler-response.xml @@ -61,7 +61,7 @@ </resourceInformations> </resourcesUsed> <hideReservationQueues>false</hideReservationQueues> - <nodeLabels>*</nodeLabels> + <nodeLabels>root-a-default-label</nodeLabels> <allocatedContainers>0</allocatedContainers> <reservedContainers>0</reservedContainers> <pendingContainers>0</pendingContainers> @@ -185,6 +185,117 @@ </resourceInformations> </effectiveMaxResource> </queueCapacitiesByPartition> + <queueCapacitiesByPartition> + <partitionName>root-a-default-label</partitionName> + <queueCapacityVectorInfo> + <configuredCapacityVector>[]</configuredCapacityVector> + </queueCapacityVectorInfo> + <capacity>0.0</capacity> + <usedCapacity>0.0</usedCapacity> + <maxCapacity>100.0</maxCapacity> + <absoluteCapacity>0.0</absoluteCapacity> + <absoluteUsedCapacity>0.0</absoluteUsedCapacity> + <absoluteMaxCapacity>0.0</absoluteMaxCapacity> + <maxAMLimitPercentage>0.0</maxAMLimitPercentage> + <weight>-1.0</weight> + <normalizedWeight>0.0</normalizedWeight> + <configuredMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMinResource> + <configuredMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </configuredMaxResource> + <effectiveMinResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMinResource> + <effectiveMaxResource> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>8192</maximumAllocation> + <minimumAllocation>1024</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>4</maximumAllocation> + <minimumAllocation>1</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </effectiveMaxResource> + </queueCapacitiesByPartition> </capacities> <resources> <resourceUsagesByPartition> @@ -334,6 +445,153 @@ </resourceInformations> </userAmLimit> </resourceUsagesByPartition> + <resourceUsagesByPartition> + <partitionName>root-a-default-label</partitionName> + <used> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </used> + <reserved> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </reserved> + <pending> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </pending> + <amUsed> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amUsed> + <amLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </amLimit> + <userAmLimit> + <memory>0</memory> + <vCores>0</vCores> + <resourceInformations> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>memory-mb</name> + <resourceType>COUNTABLE</resourceType> + <units>Mi</units> + <value>0</value> + </resourceInformation> + <resourceInformation> + <attributes/> + <maximumAllocation>9223372036854775807</maximumAllocation> + <minimumAllocation>0</minimumAllocation> + <name>vcores</name> + <resourceType>COUNTABLE</resourceType> + <units/> + <value>0</value> + </resourceInformation> + </resourceInformations> + </userAmLimit> + </resourceUsagesByPartition> </resources> <minEffectiveCapacity> <memory>4096</memory> --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org