From bb1135c77c34ca5dcd8d43fca31c635b65bf3638 Mon Sep 17 00:00:00 2001 From: Szilard Nemeth Date: Thu, 17 Feb 2022 19:12:51 +0100 Subject: [PATCH] YARN-10894. Follow up YARN-10237: fix the new test case in TestRMWebServicesCapacitySched. Contributed by Tamas Domok --- .../TestRMWebServicesCapacitySched.java | 2 +- .../TestRMWebServicesSchedulerActivities.java | 4 +- ...scheduler-response-NodeLabelDefaultAPI.xml | 491 +++++++++++++++++- .../scheduler-response-PerUserResources.json | 487 ++++++++++++++++- .../scheduler-response-PerUserResources.xml | 490 ++++++++++++++++- .../resources/webapp/scheduler-response.json | 487 ++++++++++++++++- .../resources/webapp/scheduler-response.xml | 490 ++++++++++++++++- 7 files changed, 2443 insertions(+), 8 deletions(-) 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 1f73870ccce..2be9b54c865 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 @@ -120,7 +120,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase { // Define top-level queues config.setQueues(CapacitySchedulerConfiguration.ROOT, - new String[] {"a", "b"}); + new String[] {"a", "b", "c"}); final String a = CapacitySchedulerConfiguration.ROOT + ".a"; config.setCapacity(a, 10.5f); 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/TestRMWebServicesSchedulerActivities.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesSchedulerActivities.java index f864794d592..3fc3c26c00a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesSchedulerActivities.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesSchedulerActivities.java @@ -156,7 +156,7 @@ public class TestRMWebServicesSchedulerActivities verifyStateOfAllocations(allocation, FN_ACT_FINAL_ALLOCATION_STATE, "ALLOCATED"); verifyQueueOrder(allocation, - "root-root.a-root.b-root.b.b2-root.b.b3-root.b.b1"); + "root-root.a-root.c-root.b-root.b.b2-root.b.b3-root.b.b1"); } finally { rm.stop(); } @@ -380,7 +380,7 @@ public class TestRMWebServicesSchedulerActivities JSONObject allocations = getFirstSubNodeFromJson(json, FN_SCHEDULER_ACT_ROOT, FN_ACT_ALLOCATIONS); verifyQueueOrder(allocations, - "root-root.a-root.b-root.b.b3-root.b.b1"); + "root-root.c-root.a-root.b-root.b.b3-root.b.b1"); verifyStateOfAllocations(allocations, FN_ACT_FINAL_ALLOCATION_STATE, "RESERVED"); 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 48b6893ac96..d49491febbe 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 @@ -10,6 +10,495 @@ 2147483647 false + + root.c + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + -1.0 + 0.0 + 0 + 2147483647 + c + true + RUNNING + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + false + * + 0 + 0 + 0 + + + + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + 10.0 + -1.0 + 0.0 + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 8192 + 1024 + memory-mb + COUNTABLE + Mi + 0 + + + + 4 + 1 + vcores + COUNTABLE + + 0 + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 8192 + 4 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 8192 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 4 + + + + + + ADMINISTER_QUEUE + + + + APPLICATION_MAX_PRIORITY + * + + + SUBMIT_APP + + + + 0 + fifo + false + + absolute + leaf + static + off + ROOT-INHERITED + + + + 0 + 0 + 0 + 0 + 0 + 100.0 + + 1.0 + 0.1 + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + true + true + 0 + false + -1 + -1 + root.a 10.5 @@ -4547,4 +5036,4 @@ - + \ No newline at end of file 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 7960bf73eb0..22f174415c6 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 @@ -10,6 +10,491 @@ "maxParallelApps": 2147483647, "isAbsoluteResource": false, "queues": {"queue": [ + { + "type": "capacitySchedulerLeafQueueInfo", + "queuePath": "root.c", + "capacity": 0, + "usedCapacity": 0, + "maxCapacity": 100, + "absoluteCapacity": 0, + "absoluteMaxCapacity": 0, + "absoluteUsedCapacity": 0, + "weight": -1, + "normalizedWeight": 0, + "numApplications": 0, + "maxParallelApps": 2147483647, + "queueName": "c", + "isAbsoluteResource": true, + "state": "RUNNING", + "resourcesUsed": { + "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 + } + ]} + }, + "hideReservationQueues": false, + "nodeLabels": ["*"], + "allocatedContainers": 0, + "reservedContainers": 0, + "pendingContainers": 0, + "capacities": {"queueCapacitiesByPartition": [{ + "partitionName": "", + "capacity": 0, + "usedCapacity": 0, + "maxCapacity": 100, + "absoluteCapacity": 0, + "absoluteUsedCapacity": 0, + "absoluteMaxCapacity": 0, + "maxAMLimitPercentage": 10, + "weight": -1, + "normalizedWeight": 0, + "configuredMinResource": { + "memory": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "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": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 0 + } + ]} + }, + "effectiveMaxResource": { + "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 + } + ]} + } + }]}, + "resources": {"resourceUsagesByPartition": [{ + "partitionName": "", + "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": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "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": { + "memory": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 0 + } + ]} + }, + "maxEffectiveCapacity": { + "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 + } + ]} + }, + "maximumAllocation": { + "memory": 8192, + "vCores": 4, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 8192 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 4 + } + ]} + }, + "queueAcls": {"queueAcl": [ + { + "accessType": "ADMINISTER_QUEUE", + "accessControlList": " " + }, + { + "accessType": "APPLICATION_MAX_PRIORITY", + "accessControlList": "*" + }, + { + "accessType": "SUBMIT_APP", + "accessControlList": " " + } + ]}, + "queuePriority": 0, + "orderingPolicyInfo": "fifo", + "autoCreateChildQueueEnabled": false, + "leafQueueTemplate": {}, + "mode": "absolute", + "queueType": "leaf", + "creationMethod": "static", + "autoCreationEligibility": "off", + "autoQueueTemplateProperties": {}, + "autoQueueParentTemplateProperties": {}, + "autoQueueLeafTemplateProperties": {}, + "numActiveApplications": 0, + "numPendingApplications": 0, + "numContainers": 0, + "maxApplications": 0, + "maxApplicationsPerUser": 0, + "userLimit": 100, + "users": {}, + "userLimitFactor": 1, + "configuredMaxAMResourceLimit": 0.1, + "AMResourceLimit": { + "memory": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "usedAMResource": { + "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 + } + ]} + }, + "userAMResourceLimit": { + "memory": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "preemptionDisabled": true, + "intraQueuePreemptionDisabled": true, + "defaultPriority": 0, + "isAutoCreatedLeafQueue": false, + "maxApplicationLifetime": -1, + "defaultApplicationLifetime": -1 + }, { "queuePath": "root.a", "capacity": 10.5, @@ -4954,4 +5439,4 @@ "autoQueueTemplateProperties": {}, "autoQueueParentTemplateProperties": {}, "autoQueueLeafTemplateProperties": {} -}}} +}}} \ No newline at end of file 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 97d937b7f4c..13764582a19 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 @@ -10,6 +10,494 @@ 2147483647 false + + root.c + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + -1.0 + 0.0 + 0 + 2147483647 + c + true + RUNNING + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + false + * + 0 + 0 + 0 + + + + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + 10.0 + -1.0 + 0.0 + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 8192 + 1024 + memory-mb + COUNTABLE + Mi + 0 + + + + 4 + 1 + vcores + COUNTABLE + + 0 + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 8192 + 4 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 8192 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 4 + + + + + + ADMINISTER_QUEUE + + + + APPLICATION_MAX_PRIORITY + * + + + SUBMIT_APP + + + + 0 + fifo + false + + absolute + leaf + static + off + + + + 0 + 0 + 0 + 0 + 0 + 100.0 + + 1.0 + 0.1 + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + true + true + 0 + false + -1 + -1 + root.a 10.5 @@ -4993,4 +5481,4 @@ - + \ No newline at end of file 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 26289cceda7..47acd70cd59 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 @@ -10,6 +10,491 @@ "maxParallelApps": 2147483647, "isAbsoluteResource": false, "queues": {"queue": [ + { + "type": "capacitySchedulerLeafQueueInfo", + "queuePath": "root.c", + "capacity": 0, + "usedCapacity": 0, + "maxCapacity": 100, + "absoluteCapacity": 0, + "absoluteMaxCapacity": 0, + "absoluteUsedCapacity": 0, + "weight": -1, + "normalizedWeight": 0, + "numApplications": 0, + "maxParallelApps": 2147483647, + "queueName": "c", + "isAbsoluteResource": true, + "state": "RUNNING", + "resourcesUsed": { + "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 + } + ]} + }, + "hideReservationQueues": false, + "nodeLabels": ["*"], + "allocatedContainers": 0, + "reservedContainers": 0, + "pendingContainers": 0, + "capacities": {"queueCapacitiesByPartition": [{ + "partitionName": "", + "capacity": 0, + "usedCapacity": 0, + "maxCapacity": 100, + "absoluteCapacity": 0, + "absoluteUsedCapacity": 0, + "absoluteMaxCapacity": 0, + "maxAMLimitPercentage": 10, + "weight": -1, + "normalizedWeight": 0, + "configuredMinResource": { + "memory": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "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": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 0 + } + ]} + }, + "effectiveMaxResource": { + "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 + } + ]} + } + }]}, + "resources": {"resourceUsagesByPartition": [{ + "partitionName": "", + "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": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "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": { + "memory": 1024, + "vCores": 0, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 0 + } + ]} + }, + "maxEffectiveCapacity": { + "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 + } + ]} + }, + "maximumAllocation": { + "memory": 8192, + "vCores": 4, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 8192 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 4 + } + ]} + }, + "queueAcls": {"queueAcl": [ + { + "accessType": "ADMINISTER_QUEUE", + "accessControlList": " " + }, + { + "accessType": "APPLICATION_MAX_PRIORITY", + "accessControlList": "*" + }, + { + "accessType": "SUBMIT_APP", + "accessControlList": " " + } + ]}, + "queuePriority": 0, + "orderingPolicyInfo": "fifo", + "autoCreateChildQueueEnabled": false, + "leafQueueTemplate": {}, + "mode": "absolute", + "queueType": "leaf", + "creationMethod": "static", + "autoCreationEligibility": "off", + "autoQueueTemplateProperties": {}, + "autoQueueParentTemplateProperties": {}, + "autoQueueLeafTemplateProperties": {}, + "numActiveApplications": 0, + "numPendingApplications": 0, + "numContainers": 0, + "maxApplications": 0, + "maxApplicationsPerUser": 0, + "userLimit": 100, + "users": {}, + "userLimitFactor": 1, + "configuredMaxAMResourceLimit": 0.1, + "AMResourceLimit": { + "memory": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "usedAMResource": { + "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 + } + ]} + }, + "userAMResourceLimit": { + "memory": 1024, + "vCores": 1, + "resourceInformations": {"resourceInformation": [ + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "memory-mb", + "resourceType": "COUNTABLE", + "units": "Mi", + "value": 1024 + }, + { + "attributes": {}, + "maximumAllocation": 9223372036854775807, + "minimumAllocation": 0, + "name": "vcores", + "resourceType": "COUNTABLE", + "units": "", + "value": 1 + } + ]} + }, + "preemptionDisabled": true, + "intraQueuePreemptionDisabled": true, + "defaultPriority": 0, + "isAutoCreatedLeafQueue": false, + "maxApplicationLifetime": -1, + "defaultApplicationLifetime": -1 + }, { "queuePath": "root.a", "capacity": 10.5, @@ -4501,4 +4986,4 @@ "autoQueueTemplateProperties": {}, "autoQueueParentTemplateProperties": {}, "autoQueueLeafTemplateProperties": {} -}}} +}}} \ No newline at end of file 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 d196ec8be61..c800195514f 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 @@ -10,6 +10,494 @@ 2147483647 false + + root.c + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + -1.0 + 0.0 + 0 + 2147483647 + c + true + RUNNING + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + false + * + 0 + 0 + 0 + + + + 0.0 + 0.0 + 100.0 + 0.0 + 0.0 + 0.0 + 10.0 + -1.0 + 0.0 + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 8192 + 1024 + memory-mb + COUNTABLE + Mi + 0 + + + + 4 + 1 + vcores + COUNTABLE + + 0 + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + + + 1024 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 8192 + 4 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 8192 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 4 + + + + + + ADMINISTER_QUEUE + + + + APPLICATION_MAX_PRIORITY + * + + + SUBMIT_APP + + + + 0 + fifo + false + + absolute + leaf + static + off + + + + 0 + 0 + 0 + 0 + 0 + 100.0 + + 1.0 + 0.1 + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + + 0 + 0 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 0 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 0 + + + + + 1024 + 1 + + + + 9223372036854775807 + 0 + memory-mb + COUNTABLE + Mi + 1024 + + + + 9223372036854775807 + 0 + vcores + COUNTABLE + + 1 + + + + true + true + 0 + false + -1 + -1 + root.a 10.5 @@ -4536,4 +5024,4 @@ - + \ No newline at end of file