From 4a3e9514c3d9b6de3e80a29dc2a341d897ebb7e2 Mon Sep 17 00:00:00 2001 From: Thomas Graves Date: Tue, 3 Apr 2012 20:41:22 +0000 Subject: [PATCH] merge -r 1309132:1309133 from trunk. FIXES: MAPREDUCE-4020 git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1309134 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 + .../webapp/CapacitySchedulerPage.java | 6 +- .../webapp/JAXBContextResolver.java | 3 +- .../webapp/dao/CapacitySchedulerInfo.java | 14 +- .../dao/CapacitySchedulerQueueInfo.java | 8 +- .../dao/CapacitySchedulerQueueInfoList.java | 46 ++ .../TestRMWebServicesCapacitySched.java | 65 +- .../src/site/apt/ResourceManagerRest.apt.vm | 616 ++++++++++-------- 8 files changed, 437 insertions(+), 324 deletions(-) create mode 100644 hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfoList.java diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index d030ad9fe58..ff16b29e7a9 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -138,6 +138,9 @@ Release 0.23.3 - UNRELEASED MAPREDUCE-3999. Tracking link gives an error if the AppMaster hasn't started yet (Ravi Prakash via bobby) + MAPREDUCE-4020. Web services returns incorrect JSON for deep queue tree + (Anupam Seth via tgraves) + Release 0.23.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java index 2bfda630202..110bf8d17a9 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java @@ -100,8 +100,8 @@ class CapacitySchedulerPage extends RmView { @Override public void render(Block html) { ArrayList subQueues = - (csqinfo.qinfo == null) ? csqinfo.csinfo.getSubQueues() - : csqinfo.qinfo.getSubQueues(); + (csqinfo.qinfo == null) ? csqinfo.csinfo.getQueues().getQueueInfoList() + : csqinfo.qinfo.getQueues().getQueueInfoList(); UL ul = html.ul("#pq"); for (CapacitySchedulerQueueInfo info : subQueues) { float used = info.getUsedCapacity() / 100; @@ -122,7 +122,7 @@ class CapacitySchedulerPage extends RmView { _(join(percent(used), " used"))._(); csqinfo.qinfo = info; - if (info.getSubQueues() == null) { + if (info.getQueues() == null) { li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._(); } else { li._(QueueBlock.class); diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/JAXBContextResolver.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/JAXBContextResolver.java index edeb1bab04a..c7ce9c87e44 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/JAXBContextResolver.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/JAXBContextResolver.java @@ -34,6 +34,7 @@ import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppsInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfo; +import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerQueueInfoList; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FifoSchedulerInfo; @@ -57,7 +58,7 @@ public class JAXBContextResolver implements ContextResolver { SchedulerTypeInfo.class, NodeInfo.class, UserMetricsInfo.class, CapacitySchedulerInfo.class, ClusterMetricsInfo.class, SchedulerInfo.class, AppsInfo.class, NodesInfo.class, - RemoteExceptionData.class}; + RemoteExceptionData.class, CapacitySchedulerQueueInfoList.class}; public JAXBContextResolver() throws Exception { this.types = new HashSet(Arrays.asList(cTypes)); diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerInfo.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerInfo.java index f0a34d405ad..5f323427447 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerInfo.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerInfo.java @@ -18,8 +18,6 @@ package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao; -import java.util.ArrayList; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -38,7 +36,7 @@ public class CapacitySchedulerInfo extends SchedulerInfo { protected float usedCapacity; protected float maxCapacity; protected String queueName; - protected ArrayList queues; + protected CapacitySchedulerQueueInfoList queues; @XmlTransient static final float EPSILON = 1e-8f; @@ -74,22 +72,22 @@ public class CapacitySchedulerInfo extends SchedulerInfo { return this.queueName; } - public ArrayList getSubQueues() { + public CapacitySchedulerQueueInfoList getQueues() { return this.queues; } - protected ArrayList getQueues(CSQueue parent) { + protected CapacitySchedulerQueueInfoList getQueues(CSQueue parent) { CSQueue parentQueue = parent; - ArrayList queuesInfo = new ArrayList(); + CapacitySchedulerQueueInfoList queuesInfo = new CapacitySchedulerQueueInfoList(); for (CSQueue queue : parentQueue.getChildQueues()) { CapacitySchedulerQueueInfo info; if (queue instanceof LeafQueue) { info = new CapacitySchedulerLeafQueueInfo((LeafQueue)queue); } else { info = new CapacitySchedulerQueueInfo(queue); - info.subQueues = getQueues(queue); + info.queues = getQueues(queue); } - queuesInfo.add(info); + queuesInfo.addToQueueInfoList(info); } return queuesInfo; } diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfo.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfo.java index e3e81500105..6757227c63a 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfo.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfo.java @@ -17,8 +17,6 @@ */ package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao; -import java.util.ArrayList; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -49,7 +47,7 @@ public class CapacitySchedulerQueueInfo { protected String usedResources; protected String queueName; protected QueueState state; - protected ArrayList subQueues; + protected CapacitySchedulerQueueInfoList queues; CapacitySchedulerQueueInfo() { }; @@ -117,8 +115,8 @@ public class CapacitySchedulerQueueInfo { return this.queuePath; } - public ArrayList getSubQueues() { - return this.subQueues; + public CapacitySchedulerQueueInfoList getQueues() { + return this.queues; } /** diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfoList.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfoList.java new file mode 100644 index 00000000000..f28926c34f6 --- /dev/null +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/CapacitySchedulerQueueInfoList.java @@ -0,0 +1,46 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao; + +import java.util.ArrayList; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.FIELD) +public class CapacitySchedulerQueueInfoList { + protected ArrayList queue; + + public CapacitySchedulerQueueInfoList() { + queue = new ArrayList(); + } + + public ArrayList getQueueInfoList() { + return this.queue; + } + + public boolean addToQueueInfoList(CapacitySchedulerQueueInfo e) { + return this.queue.add(e); + } + + public CapacitySchedulerQueueInfo getQueueInfo(int i) { + return this.queue.get(i); + } +} diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java index f3275ea0148..b8dc072ba37 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServicesCapacitySched.java @@ -151,7 +151,12 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { conf.setUserLimitFactor(B2, 100.0f); conf.setCapacity(B3, 20); conf.setUserLimitFactor(B3, 100.0f); - + + conf.setQueues(A1, new String[] {"a1a", "a1b"}); + final String A1A = A1 + ".a1a"; + conf.setCapacity(A1A, 85); + final String A1B = A1 + ".a1b"; + conf.setCapacity(A1B, 15); } @Before @@ -232,12 +237,18 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { WebServicesTestUtils.getXmlFloat(element, "maxCapacity"), WebServicesTestUtils.getXmlString(element, "queueName")); - NodeList queues = element.getElementsByTagName("queues"); - for (int j = 0; j < queues.getLength(); j++) { - Element qElem = (Element) queues.item(j); - String qName = WebServicesTestUtils.getXmlString(qElem, "queueName"); - String q = CapacitySchedulerConfiguration.ROOT + "." + qName; - verifySubQueueXML(qElem, q, 100, 100); + NodeList children = element.getChildNodes(); + for (int j = 0; j < children.getLength(); j++) { + Element qElem = (Element) children.item(j); + if(qElem.getTagName().equals("queues")) { + NodeList qListInfos = qElem.getChildNodes(); + for (int k = 0; k < qListInfos.getLength(); k++) { + Element qElem2 = (Element) qListInfos.item(k); + String qName2 = WebServicesTestUtils.getXmlString(qElem2, "queueName"); + String q2 = CapacitySchedulerConfiguration.ROOT + "." + qName2; + verifySubQueueXML(qElem2, q2, 100, 100); + } + } } } } @@ -245,8 +256,18 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { public void verifySubQueueXML(Element qElem, String q, float parentAbsCapacity, float parentAbsMaxCapacity) throws Exception { - NodeList queues = qElem.getElementsByTagName("subQueues"); - QueueInfo qi = (queues != null) ? new QueueInfo() : new LeafQueueInfo(); + NodeList children = qElem.getChildNodes(); + boolean hasSubQueues = false; + for (int j = 0; j < children.getLength(); j++) { + Element qElem2 = (Element) children.item(j); + if(qElem2.getTagName().equals("queues")) { + NodeList qListInfos = qElem2.getChildNodes(); + if (qListInfos.getLength() > 0) { + hasSubQueues = true; + } + } + } + QueueInfo qi = (hasSubQueues) ? new QueueInfo() : new LeafQueueInfo(); qi.capacity = WebServicesTestUtils.getXmlFloat(qElem, "capacity"); qi.usedCapacity = WebServicesTestUtils.getXmlFloat(qElem, "usedCapacity"); @@ -263,14 +284,18 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { qi.queueName = WebServicesTestUtils.getXmlString(qElem, "queueName"); qi.state = WebServicesTestUtils.getXmlString(qElem, "state"); verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity); - - if (queues != null) { - for (int j = 0; j < queues.getLength(); j++) { - Element subqElem = (Element) queues.item(j); - String qName = WebServicesTestUtils.getXmlString(subqElem, "queueName"); - String q2 = q + "." + qName; - verifySubQueueXML(subqElem, q2, - qi.absoluteCapacity, qi.absoluteMaxCapacity); + if (hasSubQueues) { + for (int j = 0; j < children.getLength(); j++) { + Element qElem2 = (Element) children.item(j); + if(qElem2.getTagName().equals("queues")) { + NodeList qListInfos = qElem2.getChildNodes(); + for (int k = 0; k < qListInfos.getLength(); k++) { + Element qElem3 = (Element) qListInfos.item(k); + String qName3 = WebServicesTestUtils.getXmlString(qElem3, "queueName"); + String q3 = q + "." + qName3; + verifySubQueueXML(qElem3, q3, qi.absoluteCapacity, qi.absoluteMaxCapacity); + } + } } } else { LeafQueueInfo lqi = (LeafQueueInfo) qi; @@ -307,7 +332,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { (float) info.getDouble("capacity"), (float) info.getDouble("maxCapacity"), info.getString("queueName")); - JSONArray arr = info.getJSONArray("queues"); + JSONArray arr = info.getJSONObject("queues").getJSONArray("queue"); assertEquals("incorrect number of elements", 2, arr.length()); // test subqueues @@ -333,7 +358,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { throws JSONException, Exception { int numExpectedElements = 11; boolean isParentQueue = true; - if (!info.has("subQueues")) { + if (!info.has("queues")) { numExpectedElements = 20; isParentQueue = false; } @@ -354,7 +379,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest { verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity); if (isParentQueue) { - JSONArray arr = info.getJSONArray("subQueues"); + JSONArray arr = info.getJSONObject("queues").getJSONArray("queue"); // test subqueues for (int i = 0; i < arr.length(); i++) { JSONObject obj = arr.getJSONObject(i); diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/ResourceManagerRest.apt.vm b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/ResourceManagerRest.apt.vm index eaaae564f51..977bd52b684 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/ResourceManagerRest.apt.vm +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/ResourceManagerRest.apt.vm @@ -324,7 +324,7 @@ ResourceManager REST API's. | queues | array of queues(JSON)/zero or more queue objects(XML) | A collection of queue resources| *---------------+--------------+-------------------------------+ -** Elements of the queues/subQueues object for a Parent queue +** Elements of the queues object for a Parent queue *---------------+--------------+-------------------------------+ || Item || Data Type || Description | @@ -349,10 +349,10 @@ ResourceManager REST API's. *---------------+--------------+-------------------------------+ | state | string of QueueState | The state of the queue | *---------------+--------------+-------------------------------+ -| subQueues | array of queues(JSON)/zero or more queue objects(XML) | A collection of sub-queue information| +| queues | array of queues(JSON)/zero or more queue objects(XML) | A collection of sub-queue information| *---------------+--------------+-------------------------------+ -** Elements of the queues/subQueues object for a Leaf queue - contains all elements in parent plus the following: +** Elements of the queues object for a Leaf queue - contains all elements in parent plus the following: *---------------+--------------+-------------------------------+ || Item || Data Type || Description | @@ -406,168 +406,190 @@ ResourceManager REST API's. "queueName" : "root", "maxCapacity" : 100, "type" : "capacityScheduler", - "queues" : [ - { - "numPendingApplications" : 0, - "queueName" : "default", - "userLimitFactor" : 1, - "maxApplications" : 7000, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 90, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 90, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 70, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 70, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 7000 - }, - { - "queueName" : "test", - "absoluteUsedCapacity" : 0, - "absoluteCapacity" : 20, - "usedCapacity" : 0, - "capacity" : 20, - "subQueues" : [ - { - "numPendingApplications" : 0, - "queueName" : "a1", - "userLimitFactor" : 1, - "maxApplications" : 1200, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 80, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 16.000002, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 12, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 60.000004, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 1200 + "queues" : { + "queue" : [ + { + "numPendingApplications" : 0, + "queueName" : "default", + "userLimitFactor" : 1, + "maxApplications" : 1, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 90, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 90, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 70, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 70, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 1 + }, + { + "queueName" : "test", + "absoluteCapacity" : 20, + "usedCapacity" : 0, + "capacity" : 20, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 100, + "queues" : { + "queue" : [ + { + "queueName" : "a1", + "absoluteCapacity" : 12, + "usedCapacity" : 0, + "capacity" : 60.000004, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 100, + "queues" : { + "queue" : [ + { + "numPendingApplications" : 0, + "queueName" : "a11", + "userLimitFactor" : 1, + "maxApplications" : 0, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 100, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 10.200001, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 85, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 0 + }, + { + "numPendingApplications" : 0, + "queueName" : "a12", + "userLimitFactor" : 1, + "maxApplications" : 0, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 100, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 1.8000001, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 15.000001, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 0 + } + ] + }, + "absoluteUsedCapacity" : 0 + }, + { + "numPendingApplications" : 0, + "queueName" : "a2", + "userLimitFactor" : 1, + "maxApplications" : 0, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 100, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 8.000001, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 40, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 0 + } + ] }, - { - "numPendingApplications" : 0, - "queueName" : "a2", - "userLimitFactor" : 1, - "maxApplications" : 800, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 100, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 100, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 8.000001, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 40, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 800 - } - ], - "state" : "RUNNING", - "maxCapacity" : 80, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 80 - }, - { - "queueName" : "test2", - "absoluteUsedCapacity" : 0, - "absoluteCapacity" : 10, - "usedCapacity" : 0, - "capacity" : 10, - "subQueues" : [ - { - "numPendingApplications" : 0, - "queueName" : "a5", - "userLimitFactor" : 1, - "maxApplications" : 500, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 100, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 100, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 5, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 50, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 500 + "absoluteUsedCapacity" : 0 + }, + { + "queueName" : "test2", + "absoluteCapacity" : 10, + "usedCapacity" : 0, + "capacity" : 10, + "state" : "RUNNING", + "maxCapacity" : 15.000001, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 15.000001, + "queues" : { + "queue" : [ + { + "numPendingApplications" : 0, + "queueName" : "a3", + "userLimitFactor" : 1, + "maxApplications" : 0, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 15.000001, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 9, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 90, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 0 + }, + { + "numPendingApplications" : 0, + "queueName" : "a4", + "userLimitFactor" : 1, + "maxApplications" : 0, + "usedCapacity" : 0, + "numContainers" : 0, + "state" : "RUNNING", + "maxCapacity" : 100, + "numApplications" : 0, + "usedResources" : "memory: 0", + "absoluteMaxCapacity" : 15.000001, + "maxActiveApplications" : 1, + "numActiveApplications" : 0, + "absoluteUsedCapacity" : 0, + "userLimit" : 100, + "absoluteCapacity" : 1.0000001, + "maxActiveApplicationsPerUser" : 1, + "capacity" : 10, + "type" : "capacitySchedulerLeafQueueInfo", + "maxApplicationsPerUser" : 0 + } + ] }, - { - "numPendingApplications" : 0, - "queueName" : "a3", - "userLimitFactor" : 1, - "maxApplications" : 400, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 100, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 100, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 4.0000005, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 40, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 400 - }, - { - "numPendingApplications" : 0, - "queueName" : "a4", - "userLimitFactor" : 1, - "maxApplications" : 100, - "usedCapacity" : 0, - "numContainers" : 0, - "state" : "RUNNING", - "maxCapacity" : 100, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 100, - "maxActiveApplications" : 1, - "numActiveApplications" : 0, - "absoluteUsedCapacity" : 0, - "userLimit" : 100, - "absoluteCapacity" : 1.0000001, - "maxActiveApplicationsPerUser" : 1, - "capacity" : 10, - "type" : "capacitySchedulerLeafQueueInfo", - "maxApplicationsPerUser" : 100 - } - ], - "state" : "RUNNING", - "maxCapacity" : 15.000001, - "numApplications" : 0, - "usedResources" : "memory: 0", - "absoluteMaxCapacity" : 15.000001 - } - ], + "absoluteUsedCapacity" : 0 + } + ] + }, "usedCapacity" : 0, "capacity" : 100 } @@ -575,7 +597,7 @@ ResourceManager REST API's. } +---+ - <> + <> HTTP Request: @@ -603,155 +625,175 @@ ResourceManager REST API's. 0.0 100.0 root - - 70.0 - 0.0 - 90.0 - 70.0 - 90.0 - 0.0 - 0 - memory: 0 - default - RUNNING - 0 - 0 - 0 - 7000 - 7000 - 1 - 1 - 100 - 1.0 - - 20.0 - 0.0 - 80.0 - 20.0 - 80.0 - 0.0 - 0 - memory: 0 - test - RUNNING - - 60.000004 + + 70.0 0.0 - 80.0 - 12.0 - 16.000002 + 90.0 + 70.0 + 90.0 0.0 0 memory: 0 - a1 + default RUNNING 0 0 0 - 1200 - 1200 + 1 + 1 1 1 100 1.0 - - - 40.0 + + + 20.0 0.0 100.0 - 8.000001 + 20.0 100.0 0.0 0 memory: 0 - a2 + test RUNNING - 0 - 0 - 0 - 800 - 800 - 1 - 1 - 100 - 1.0 - - - - 10.0 - 0.0 - 15.000001 - 10.0 - 15.000001 - 0.0 - 0 - memory: 0 - test2 - RUNNING - - 50.0 - 0.0 - 100.0 - 5.0 - 100.0 - 0.0 - 0 - memory: 0 - A4 - RUNNING - 0 - 0 - 0 - 500 - 500 - 1 - 1 - 100 - 1.0 - - - 40.0 - 0.0 - 100.0 - 4.0000005 - 100.0 - 0.0 - 0 - memory: 0 - a3 - RUNNING - 0 - 0 - 0 - 400 - 400 - 1 - 1 - 100 - 1.0 - - + + + 60.000004 + 0.0 + 100.0 + 12.0 + 100.0 + 0.0 + 0 + memory: 0 + a1 + RUNNING + + + 85.0 + 0.0 + 100.0 + 10.200001 + 100.0 + 0.0 + 0 + memory: 0 + a11 + RUNNING + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 100 + 1.0 + + + 15.000001 + 0.0 + 100.0 + 1.8000001 + 100.0 + 0.0 + 0 + memory: 0 + a12 + RUNNING + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 100 + 1.0 + + + + + 40.0 + 0.0 + 100.0 + 8.000001 + 100.0 + 0.0 + 0 + memory: 0 + a2 + RUNNING + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 100 + 1.0 + + + + 10.0 0.0 - 100.0 - 1.0000001 - 100.0 + 15.000001 + 10.0 + 15.000001 0.0 0 memory: 0 - a4 + test2 RUNNING - 0 - 0 - 0 - 100 - 100 - 1 - 1 - 100 - 1.0 - + + + 90.0 + 0.0 + 100.0 + 9.0 + 15.000001 + 0.0 + 0 + memory: 0 + a3 + RUNNING + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 100 + 1.0 + + + 10.0 + 0.0 + 100.0 + 1.0000001 + 15.000001 + 0.0 + 0 + memory: 0 + a4 + RUNNING + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 100 + 1.0 + + +