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
This commit is contained in:
Thomas Graves 2012-04-03 20:41:22 +00:00
parent 40a8dfa3c6
commit 4a3e9514c3
8 changed files with 437 additions and 324 deletions

View File

@ -138,6 +138,9 @@ Release 0.23.3 - UNRELEASED
MAPREDUCE-3999. Tracking link gives an error if the AppMaster hasn't MAPREDUCE-3999. Tracking link gives an error if the AppMaster hasn't
started yet (Ravi Prakash via bobby) 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 Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -100,8 +100,8 @@ class CapacitySchedulerPage extends RmView {
@Override @Override
public void render(Block html) { public void render(Block html) {
ArrayList<CapacitySchedulerQueueInfo> subQueues = ArrayList<CapacitySchedulerQueueInfo> subQueues =
(csqinfo.qinfo == null) ? csqinfo.csinfo.getSubQueues() (csqinfo.qinfo == null) ? csqinfo.csinfo.getQueues().getQueueInfoList()
: csqinfo.qinfo.getSubQueues(); : csqinfo.qinfo.getQueues().getQueueInfoList();
UL<Hamlet> ul = html.ul("#pq"); UL<Hamlet> ul = html.ul("#pq");
for (CapacitySchedulerQueueInfo info : subQueues) { for (CapacitySchedulerQueueInfo info : subQueues) {
float used = info.getUsedCapacity() / 100; float used = info.getUsedCapacity() / 100;
@ -122,7 +122,7 @@ class CapacitySchedulerPage extends RmView {
_(join(percent(used), " used"))._(); _(join(percent(used), " used"))._();
csqinfo.qinfo = info; csqinfo.qinfo = info;
if (info.getSubQueues() == null) { if (info.getQueues() == null) {
li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._(); li.ul("#lq").li()._(LeafQueueInfoBlock.class)._()._();
} else { } else {
li._(QueueBlock.class); li._(QueueBlock.class);

View File

@ -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.AppsInfo;
import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.CapacitySchedulerInfo; 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.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.ClusterInfo;
import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo;
import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FifoSchedulerInfo; import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FifoSchedulerInfo;
@ -57,7 +58,7 @@ public class JAXBContextResolver implements ContextResolver<JAXBContext> {
SchedulerTypeInfo.class, NodeInfo.class, UserMetricsInfo.class, SchedulerTypeInfo.class, NodeInfo.class, UserMetricsInfo.class,
CapacitySchedulerInfo.class, ClusterMetricsInfo.class, CapacitySchedulerInfo.class, ClusterMetricsInfo.class,
SchedulerInfo.class, AppsInfo.class, NodesInfo.class, SchedulerInfo.class, AppsInfo.class, NodesInfo.class,
RemoteExceptionData.class}; RemoteExceptionData.class, CapacitySchedulerQueueInfoList.class};
public JAXBContextResolver() throws Exception { public JAXBContextResolver() throws Exception {
this.types = new HashSet<Class>(Arrays.asList(cTypes)); this.types = new HashSet<Class>(Arrays.asList(cTypes));

View File

@ -18,8 +18,6 @@
package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao; package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@ -38,7 +36,7 @@ public class CapacitySchedulerInfo extends SchedulerInfo {
protected float usedCapacity; protected float usedCapacity;
protected float maxCapacity; protected float maxCapacity;
protected String queueName; protected String queueName;
protected ArrayList<CapacitySchedulerQueueInfo> queues; protected CapacitySchedulerQueueInfoList queues;
@XmlTransient @XmlTransient
static final float EPSILON = 1e-8f; static final float EPSILON = 1e-8f;
@ -74,22 +72,22 @@ public class CapacitySchedulerInfo extends SchedulerInfo {
return this.queueName; return this.queueName;
} }
public ArrayList<CapacitySchedulerQueueInfo> getSubQueues() { public CapacitySchedulerQueueInfoList getQueues() {
return this.queues; return this.queues;
} }
protected ArrayList<CapacitySchedulerQueueInfo> getQueues(CSQueue parent) { protected CapacitySchedulerQueueInfoList getQueues(CSQueue parent) {
CSQueue parentQueue = parent; CSQueue parentQueue = parent;
ArrayList<CapacitySchedulerQueueInfo> queuesInfo = new ArrayList<CapacitySchedulerQueueInfo>(); CapacitySchedulerQueueInfoList queuesInfo = new CapacitySchedulerQueueInfoList();
for (CSQueue queue : parentQueue.getChildQueues()) { for (CSQueue queue : parentQueue.getChildQueues()) {
CapacitySchedulerQueueInfo info; CapacitySchedulerQueueInfo info;
if (queue instanceof LeafQueue) { if (queue instanceof LeafQueue) {
info = new CapacitySchedulerLeafQueueInfo((LeafQueue)queue); info = new CapacitySchedulerLeafQueueInfo((LeafQueue)queue);
} else { } else {
info = new CapacitySchedulerQueueInfo(queue); info = new CapacitySchedulerQueueInfo(queue);
info.subQueues = getQueues(queue); info.queues = getQueues(queue);
} }
queuesInfo.add(info); queuesInfo.addToQueueInfoList(info);
} }
return queuesInfo; return queuesInfo;
} }

View File

@ -17,8 +17,6 @@
*/ */
package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao; package org.apache.hadoop.yarn.server.resourcemanager.webapp.dao;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@ -49,7 +47,7 @@ public class CapacitySchedulerQueueInfo {
protected String usedResources; protected String usedResources;
protected String queueName; protected String queueName;
protected QueueState state; protected QueueState state;
protected ArrayList<CapacitySchedulerQueueInfo> subQueues; protected CapacitySchedulerQueueInfoList queues;
CapacitySchedulerQueueInfo() { CapacitySchedulerQueueInfo() {
}; };
@ -117,8 +115,8 @@ public class CapacitySchedulerQueueInfo {
return this.queuePath; return this.queuePath;
} }
public ArrayList<CapacitySchedulerQueueInfo> getSubQueues() { public CapacitySchedulerQueueInfoList getQueues() {
return this.subQueues; return this.queues;
} }
/** /**

View File

@ -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<CapacitySchedulerQueueInfo> queue;
public CapacitySchedulerQueueInfoList() {
queue = new ArrayList<CapacitySchedulerQueueInfo>();
}
public ArrayList<CapacitySchedulerQueueInfo> getQueueInfoList() {
return this.queue;
}
public boolean addToQueueInfoList(CapacitySchedulerQueueInfo e) {
return this.queue.add(e);
}
public CapacitySchedulerQueueInfo getQueueInfo(int i) {
return this.queue.get(i);
}
}

View File

@ -151,7 +151,12 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
conf.setUserLimitFactor(B2, 100.0f); conf.setUserLimitFactor(B2, 100.0f);
conf.setCapacity(B3, 20); conf.setCapacity(B3, 20);
conf.setUserLimitFactor(B3, 100.0f); 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 @Before
@ -232,12 +237,18 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
WebServicesTestUtils.getXmlFloat(element, "maxCapacity"), WebServicesTestUtils.getXmlFloat(element, "maxCapacity"),
WebServicesTestUtils.getXmlString(element, "queueName")); WebServicesTestUtils.getXmlString(element, "queueName"));
NodeList queues = element.getElementsByTagName("queues"); NodeList children = element.getChildNodes();
for (int j = 0; j < queues.getLength(); j++) { for (int j = 0; j < children.getLength(); j++) {
Element qElem = (Element) queues.item(j); Element qElem = (Element) children.item(j);
String qName = WebServicesTestUtils.getXmlString(qElem, "queueName"); if(qElem.getTagName().equals("queues")) {
String q = CapacitySchedulerConfiguration.ROOT + "." + qName; NodeList qListInfos = qElem.getChildNodes();
verifySubQueueXML(qElem, q, 100, 100); 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, public void verifySubQueueXML(Element qElem, String q,
float parentAbsCapacity, float parentAbsMaxCapacity) float parentAbsCapacity, float parentAbsMaxCapacity)
throws Exception { throws Exception {
NodeList queues = qElem.getElementsByTagName("subQueues"); NodeList children = qElem.getChildNodes();
QueueInfo qi = (queues != null) ? new QueueInfo() : new LeafQueueInfo(); 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.capacity = WebServicesTestUtils.getXmlFloat(qElem, "capacity");
qi.usedCapacity = qi.usedCapacity =
WebServicesTestUtils.getXmlFloat(qElem, "usedCapacity"); WebServicesTestUtils.getXmlFloat(qElem, "usedCapacity");
@ -263,14 +284,18 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
qi.queueName = WebServicesTestUtils.getXmlString(qElem, "queueName"); qi.queueName = WebServicesTestUtils.getXmlString(qElem, "queueName");
qi.state = WebServicesTestUtils.getXmlString(qElem, "state"); qi.state = WebServicesTestUtils.getXmlString(qElem, "state");
verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity); verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity);
if (hasSubQueues) {
if (queues != null) { for (int j = 0; j < children.getLength(); j++) {
for (int j = 0; j < queues.getLength(); j++) { Element qElem2 = (Element) children.item(j);
Element subqElem = (Element) queues.item(j); if(qElem2.getTagName().equals("queues")) {
String qName = WebServicesTestUtils.getXmlString(subqElem, "queueName"); NodeList qListInfos = qElem2.getChildNodes();
String q2 = q + "." + qName; for (int k = 0; k < qListInfos.getLength(); k++) {
verifySubQueueXML(subqElem, q2, Element qElem3 = (Element) qListInfos.item(k);
qi.absoluteCapacity, qi.absoluteMaxCapacity); String qName3 = WebServicesTestUtils.getXmlString(qElem3, "queueName");
String q3 = q + "." + qName3;
verifySubQueueXML(qElem3, q3, qi.absoluteCapacity, qi.absoluteMaxCapacity);
}
}
} }
} else { } else {
LeafQueueInfo lqi = (LeafQueueInfo) qi; LeafQueueInfo lqi = (LeafQueueInfo) qi;
@ -307,7 +332,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
(float) info.getDouble("capacity"), (float) info.getDouble("capacity"),
(float) info.getDouble("maxCapacity"), info.getString("queueName")); (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()); assertEquals("incorrect number of elements", 2, arr.length());
// test subqueues // test subqueues
@ -333,7 +358,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
throws JSONException, Exception { throws JSONException, Exception {
int numExpectedElements = 11; int numExpectedElements = 11;
boolean isParentQueue = true; boolean isParentQueue = true;
if (!info.has("subQueues")) { if (!info.has("queues")) {
numExpectedElements = 20; numExpectedElements = 20;
isParentQueue = false; isParentQueue = false;
} }
@ -354,7 +379,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity); verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity);
if (isParentQueue) { if (isParentQueue) {
JSONArray arr = info.getJSONArray("subQueues"); JSONArray arr = info.getJSONObject("queues").getJSONArray("queue");
// test subqueues // test subqueues
for (int i = 0; i < arr.length(); i++) { for (int i = 0; i < arr.length(); i++) {
JSONObject obj = arr.getJSONObject(i); JSONObject obj = arr.getJSONObject(i);

View File

@ -324,7 +324,7 @@ ResourceManager REST API's.
| queues | array of queues(JSON)/zero or more queue objects(XML) | A collection of queue resources| | 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 | || Item || Data Type || Description |
@ -349,10 +349,10 @@ ResourceManager REST API's.
*---------------+--------------+-------------------------------+ *---------------+--------------+-------------------------------+
| state | string of QueueState | The state of the queue | | 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 | || Item || Data Type || Description |
@ -406,168 +406,190 @@ ResourceManager REST API's.
"queueName" : "root", "queueName" : "root",
"maxCapacity" : 100, "maxCapacity" : 100,
"type" : "capacityScheduler", "type" : "capacityScheduler",
"queues" : [ "queues" : {
{ "queue" : [
"numPendingApplications" : 0, {
"queueName" : "default", "numPendingApplications" : 0,
"userLimitFactor" : 1, "queueName" : "default",
"maxApplications" : 7000, "userLimitFactor" : 1,
"usedCapacity" : 0, "maxApplications" : 1,
"numContainers" : 0, "usedCapacity" : 0,
"state" : "RUNNING", "numContainers" : 0,
"maxCapacity" : 90, "state" : "RUNNING",
"numApplications" : 0, "maxCapacity" : 90,
"usedResources" : "memory: 0", "numApplications" : 0,
"absoluteMaxCapacity" : 90, "usedResources" : "memory: 0",
"maxActiveApplications" : 1, "absoluteMaxCapacity" : 90,
"numActiveApplications" : 0, "maxActiveApplications" : 1,
"absoluteUsedCapacity" : 0, "numActiveApplications" : 0,
"userLimit" : 100, "absoluteUsedCapacity" : 0,
"absoluteCapacity" : 70, "userLimit" : 100,
"maxActiveApplicationsPerUser" : 1, "absoluteCapacity" : 70,
"capacity" : 70, "maxActiveApplicationsPerUser" : 1,
"type" : "capacitySchedulerLeafQueueInfo", "capacity" : 70,
"maxApplicationsPerUser" : 7000 "type" : "capacitySchedulerLeafQueueInfo",
}, "maxApplicationsPerUser" : 1
{ },
"queueName" : "test", {
"absoluteUsedCapacity" : 0, "queueName" : "test",
"absoluteCapacity" : 20, "absoluteCapacity" : 20,
"usedCapacity" : 0, "usedCapacity" : 0,
"capacity" : 20, "capacity" : 20,
"subQueues" : [ "state" : "RUNNING",
{ "maxCapacity" : 100,
"numPendingApplications" : 0, "numApplications" : 0,
"queueName" : "a1", "usedResources" : "memory: 0",
"userLimitFactor" : 1, "absoluteMaxCapacity" : 100,
"maxApplications" : 1200, "queues" : {
"usedCapacity" : 0, "queue" : [
"numContainers" : 0, {
"state" : "RUNNING", "queueName" : "a1",
"maxCapacity" : 80, "absoluteCapacity" : 12,
"numApplications" : 0, "usedCapacity" : 0,
"usedResources" : "memory: 0", "capacity" : 60.000004,
"absoluteMaxCapacity" : 16.000002, "state" : "RUNNING",
"maxActiveApplications" : 1, "maxCapacity" : 100,
"numActiveApplications" : 0, "numApplications" : 0,
"absoluteUsedCapacity" : 0, "usedResources" : "memory: 0",
"userLimit" : 100, "absoluteMaxCapacity" : 100,
"absoluteCapacity" : 12, "queues" : {
"maxActiveApplicationsPerUser" : 1, "queue" : [
"capacity" : 60.000004, {
"type" : "capacitySchedulerLeafQueueInfo", "numPendingApplications" : 0,
"maxApplicationsPerUser" : 1200 "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
}
]
}, },
{ "absoluteUsedCapacity" : 0
"numPendingApplications" : 0, },
"queueName" : "a2", {
"userLimitFactor" : 1, "queueName" : "test2",
"maxApplications" : 800, "absoluteCapacity" : 10,
"usedCapacity" : 0, "usedCapacity" : 0,
"numContainers" : 0, "capacity" : 10,
"state" : "RUNNING", "state" : "RUNNING",
"maxCapacity" : 100, "maxCapacity" : 15.000001,
"numApplications" : 0, "numApplications" : 0,
"usedResources" : "memory: 0", "usedResources" : "memory: 0",
"absoluteMaxCapacity" : 100, "absoluteMaxCapacity" : 15.000001,
"maxActiveApplications" : 1, "queues" : {
"numActiveApplications" : 0, "queue" : [
"absoluteUsedCapacity" : 0, {
"userLimit" : 100, "numPendingApplications" : 0,
"absoluteCapacity" : 8.000001, "queueName" : "a3",
"maxActiveApplicationsPerUser" : 1, "userLimitFactor" : 1,
"capacity" : 40, "maxApplications" : 0,
"type" : "capacitySchedulerLeafQueueInfo", "usedCapacity" : 0,
"maxApplicationsPerUser" : 800 "numContainers" : 0,
} "state" : "RUNNING",
], "maxCapacity" : 100,
"state" : "RUNNING", "numApplications" : 0,
"maxCapacity" : 80, "usedResources" : "memory: 0",
"numApplications" : 0, "absoluteMaxCapacity" : 15.000001,
"usedResources" : "memory: 0", "maxActiveApplications" : 1,
"absoluteMaxCapacity" : 80 "numActiveApplications" : 0,
}, "absoluteUsedCapacity" : 0,
{ "userLimit" : 100,
"queueName" : "test2", "absoluteCapacity" : 9,
"absoluteUsedCapacity" : 0, "maxActiveApplicationsPerUser" : 1,
"absoluteCapacity" : 10, "capacity" : 90,
"usedCapacity" : 0, "type" : "capacitySchedulerLeafQueueInfo",
"capacity" : 10, "maxApplicationsPerUser" : 0
"subQueues" : [ },
{ {
"numPendingApplications" : 0, "numPendingApplications" : 0,
"queueName" : "a5", "queueName" : "a4",
"userLimitFactor" : 1, "userLimitFactor" : 1,
"maxApplications" : 500, "maxApplications" : 0,
"usedCapacity" : 0, "usedCapacity" : 0,
"numContainers" : 0, "numContainers" : 0,
"state" : "RUNNING", "state" : "RUNNING",
"maxCapacity" : 100, "maxCapacity" : 100,
"numApplications" : 0, "numApplications" : 0,
"usedResources" : "memory: 0", "usedResources" : "memory: 0",
"absoluteMaxCapacity" : 100, "absoluteMaxCapacity" : 15.000001,
"maxActiveApplications" : 1, "maxActiveApplications" : 1,
"numActiveApplications" : 0, "numActiveApplications" : 0,
"absoluteUsedCapacity" : 0, "absoluteUsedCapacity" : 0,
"userLimit" : 100, "userLimit" : 100,
"absoluteCapacity" : 5, "absoluteCapacity" : 1.0000001,
"maxActiveApplicationsPerUser" : 1, "maxActiveApplicationsPerUser" : 1,
"capacity" : 50, "capacity" : 10,
"type" : "capacitySchedulerLeafQueueInfo", "type" : "capacitySchedulerLeafQueueInfo",
"maxApplicationsPerUser" : 500 "maxApplicationsPerUser" : 0
}
]
}, },
{ "absoluteUsedCapacity" : 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
}
],
"usedCapacity" : 0, "usedCapacity" : 0,
"capacity" : 100 "capacity" : 100
} }
@ -575,7 +597,7 @@ ResourceManager REST API's.
} }
+---+ +---+
<<JSON response>> <<XML response>>
HTTP Request: HTTP Request:
@ -603,155 +625,175 @@ ResourceManager REST API's.
<usedCapacity>0.0</usedCapacity> <usedCapacity>0.0</usedCapacity>
<maxCapacity>100.0</maxCapacity> <maxCapacity>100.0</maxCapacity>
<queueName>root</queueName> <queueName>root</queueName>
<queues xsi:type="capacitySchedulerLeafQueueInfo">
<capacity>70.0</capacity>
<usedCapacity>0.0</usedCapacity>
<maxCapacity>90.0</maxCapacity>
<absoluteCapacity>70.0</absoluteCapacity>
<absoluteMaxCapacity>90.0</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications>
<usedResources>memory: 0</usedResources>
<queueName>default</queueName>
<state>RUNNING</state>
<numActiveApplications>0</numActiveApplications>
<numPendingApplications>0</numPendingApplications>
<numContainers>0</numContainers>
<maxApplications>7000</maxApplications>
<maxApplicationsPerUser>7000</maxApplicationsPerUser>
<maxActiveApplications>1</maxActiveApplications>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<userLimit>100</userLimit>
<userLimitFactor>1.0</userLimitFactor>
</queues>
<queues> <queues>
<capacity>20.0</capacity> <queue xsi:type="capacitySchedulerLeafQueueInfo">
<usedCapacity>0.0</usedCapacity> <capacity>70.0</capacity>
<maxCapacity>80.0</maxCapacity>
<absoluteCapacity>20.0</absoluteCapacity>
<absoluteMaxCapacity>80.0</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications>
<usedResources>memory: 0</usedResources>
<queueName>test</queueName>
<state>RUNNING</state>
<subQueues xsi:type="capacitySchedulerLeafQueueInfo">
<capacity>60.000004</capacity>
<usedCapacity>0.0</usedCapacity> <usedCapacity>0.0</usedCapacity>
<maxCapacity>80.0</maxCapacity> <maxCapacity>90.0</maxCapacity>
<absoluteCapacity>12.0</absoluteCapacity> <absoluteCapacity>70.0</absoluteCapacity>
<absoluteMaxCapacity>16.000002</absoluteMaxCapacity> <absoluteMaxCapacity>90.0</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications> <numApplications>0</numApplications>
<usedResources>memory: 0</usedResources> <usedResources>memory: 0</usedResources>
<queueName>a1</queueName> <queueName>default</queueName>
<state>RUNNING</state> <state>RUNNING</state>
<numActiveApplications>0</numActiveApplications> <numActiveApplications>0</numActiveApplications>
<numPendingApplications>0</numPendingApplications> <numPendingApplications>0</numPendingApplications>
<numContainers>0</numContainers> <numContainers>0</numContainers>
<maxApplications>1200</maxApplications> <maxApplications>1</maxApplications>
<maxApplicationsPerUser>1200</maxApplicationsPerUser> <maxApplicationsPerUser>1</maxApplicationsPerUser>
<maxActiveApplications>1</maxActiveApplications> <maxActiveApplications>1</maxActiveApplications>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser> <maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<userLimit>100</userLimit> <userLimit>100</userLimit>
<userLimitFactor>1.0</userLimitFactor> <userLimitFactor>1.0</userLimitFactor>
</subQueues> </queue>
<subQueues xsi:type="capacitySchedulerLeafQueueInfo"> <queue>
<capacity>40.0</capacity> <capacity>20.0</capacity>
<usedCapacity>0.0</usedCapacity> <usedCapacity>0.0</usedCapacity>
<maxCapacity>100.0</maxCapacity> <maxCapacity>100.0</maxCapacity>
<absoluteCapacity>8.000001</absoluteCapacity> <absoluteCapacity>20.0</absoluteCapacity>
<absoluteMaxCapacity>100.0</absoluteMaxCapacity> <absoluteMaxCapacity>100.0</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications> <numApplications>0</numApplications>
<usedResources>memory: 0</usedResources> <usedResources>memory: 0</usedResources>
<queueName>a2</queueName> <queueName>test</queueName>
<state>RUNNING</state> <state>RUNNING</state>
<numActiveApplications>0</numActiveApplications> <queues>
<numPendingApplications>0</numPendingApplications> <queue>
<numContainers>0</numContainers> <capacity>60.000004</capacity>
<maxApplications>800</maxApplications> <usedCapacity>0.0</usedCapacity>
<maxApplicationsPerUser>800</maxApplicationsPerUser> <maxCapacity>100.0</maxCapacity>
<maxActiveApplications>1</maxActiveApplications> <absoluteCapacity>12.0</absoluteCapacity>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser> <absoluteMaxCapacity>100.0</absoluteMaxCapacity>
<userLimit>100</userLimit> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<userLimitFactor>1.0</userLimitFactor> <numApplications>0</numApplications>
</subQueues> <usedResources>memory: 0</usedResources>
</queues> <queueName>a1</queueName>
<queues> <state>RUNNING</state>
<capacity>10.0</capacity> <queues>
<usedCapacity>0.0</usedCapacity> <queue xsi:type="capacitySchedulerLeafQueueInfo">
<maxCapacity>15.000001</maxCapacity> <capacity>85.0</capacity>
<absoluteCapacity>10.0</absoluteCapacity> <usedCapacity>0.0</usedCapacity>
<absoluteMaxCapacity>15.000001</absoluteMaxCapacity> <maxCapacity>100.0</maxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <absoluteCapacity>10.200001</absoluteCapacity>
<numApplications>0</numApplications> <absoluteMaxCapacity>100.0</absoluteMaxCapacity>
<usedResources>memory: 0</usedResources> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<queueName>test2</queueName> <numApplications>0</numApplications>
<state>RUNNING</state> <usedResources>memory: 0</usedResources>
<subQueues xsi:type="capacitySchedulerLeafQueueInfo"> <queueName>a11</queueName>
<capacity>50.0</capacity> <state>RUNNING</state>
<usedCapacity>0.0</usedCapacity> <numActiveApplications>0</numActiveApplications>
<maxCapacity>100.0</maxCapacity> <numPendingApplications>0</numPendingApplications>
<absoluteCapacity>5.0</absoluteCapacity> <numContainers>0</numContainers>
<absoluteMaxCapacity>100.0</absoluteMaxCapacity> <maxApplications>0</maxApplications>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <maxApplicationsPerUser>0</maxApplicationsPerUser>
<numApplications>0</numApplications> <maxActiveApplications>1</maxActiveApplications>
<usedResources>memory: 0</usedResources> <maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<queueName>A4</queueName> <userLimit>100</userLimit>
<state>RUNNING</state> <userLimitFactor>1.0</userLimitFactor>
<numActiveApplications>0</numActiveApplications> </queue>
<numPendingApplications>0</numPendingApplications> <queue xsi:type="capacitySchedulerLeafQueueInfo">
<numContainers>0</numContainers> <capacity>15.000001</capacity>
<maxApplications>500</maxApplications> <usedCapacity>0.0</usedCapacity>
<maxApplicationsPerUser>500</maxApplicationsPerUser> <maxCapacity>100.0</maxCapacity>
<maxActiveApplications>1</maxActiveApplications> <absoluteCapacity>1.8000001</absoluteCapacity>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser> <absoluteMaxCapacity>100.0</absoluteMaxCapacity>
<userLimit>100</userLimit> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<userLimitFactor>1.0</userLimitFactor> <numApplications>0</numApplications>
</subQueues> <usedResources>memory: 0</usedResources>
<subQueues xsi:type="capacitySchedulerLeafQueueInfo"> <queueName>a12</queueName>
<capacity>40.0</capacity> <state>RUNNING</state>
<usedCapacity>0.0</usedCapacity> <numActiveApplications>0</numActiveApplications>
<maxCapacity>100.0</maxCapacity> <numPendingApplications>0</numPendingApplications>
<absoluteCapacity>4.0000005</absoluteCapacity> <numContainers>0</numContainers>
<absoluteMaxCapacity>100.0</absoluteMaxCapacity> <maxApplications>0</maxApplications>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <maxApplicationsPerUser>0</maxApplicationsPerUser>
<numApplications>0</numApplications> <maxActiveApplications>1</maxActiveApplications>
<usedResources>memory: 0</usedResources> <maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<queueName>a3</queueName> <userLimit>100</userLimit>
<state>RUNNING</state> <userLimitFactor>1.0</userLimitFactor>
<numActiveApplications>0</numActiveApplications> </queue>
<numPendingApplications>0</numPendingApplications> </queues>
<numContainers>0</numContainers> </queue>
<maxApplications>400</maxApplications> <queue xsi:type="capacitySchedulerLeafQueueInfo">
<maxApplicationsPerUser>400</maxApplicationsPerUser> <capacity>40.0</capacity>
<maxActiveApplications>1</maxActiveApplications> <usedCapacity>0.0</usedCapacity>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser> <maxCapacity>100.0</maxCapacity>
<userLimit>100</userLimit> <absoluteCapacity>8.000001</absoluteCapacity>
<userLimitFactor>1.0</userLimitFactor> <absoluteMaxCapacity>100.0</absoluteMaxCapacity>
</subQueues> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<subQueues xsi:type="capacitySchedulerLeafQueueInfo"> <numApplications>0</numApplications>
<usedResources>memory: 0</usedResources>
<queueName>a2</queueName>
<state>RUNNING</state>
<numActiveApplications>0</numActiveApplications>
<numPendingApplications>0</numPendingApplications>
<numContainers>0</numContainers>
<maxApplications>0</maxApplications>
<maxApplicationsPerUser>0</maxApplicationsPerUser>
<maxActiveApplications>1</maxActiveApplications>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<userLimit>100</userLimit>
<userLimitFactor>1.0</userLimitFactor>
</queue>
</queues>
</queue>
<queue>
<capacity>10.0</capacity> <capacity>10.0</capacity>
<usedCapacity>0.0</usedCapacity> <usedCapacity>0.0</usedCapacity>
<maxCapacity>100.0</maxCapacity> <maxCapacity>15.000001</maxCapacity>
<absoluteCapacity>1.0000001</absoluteCapacity> <absoluteCapacity>10.0</absoluteCapacity>
<absoluteMaxCapacity>100.0</absoluteMaxCapacity> <absoluteMaxCapacity>15.000001</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications> <numApplications>0</numApplications>
<usedResources>memory: 0</usedResources> <usedResources>memory: 0</usedResources>
<queueName>a4</queueName> <queueName>test2</queueName>
<state>RUNNING</state> <state>RUNNING</state>
<numActiveApplications>0</numActiveApplications> <queues>
<numPendingApplications>0</numPendingApplications> <queue xsi:type="capacitySchedulerLeafQueueInfo">
<numContainers>0</numContainers> <capacity>90.0</capacity>
<maxApplications>100</maxApplications> <usedCapacity>0.0</usedCapacity>
<maxApplicationsPerUser>100</maxApplicationsPerUser> <maxCapacity>100.0</maxCapacity>
<maxActiveApplications>1</maxActiveApplications> <absoluteCapacity>9.0</absoluteCapacity>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser> <absoluteMaxCapacity>15.000001</absoluteMaxCapacity>
<userLimit>100</userLimit> <absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<userLimitFactor>1.0</userLimitFactor> <numApplications>0</numApplications>
</subQueues> <usedResources>memory: 0</usedResources>
<queueName>a3</queueName>
<state>RUNNING</state>
<numActiveApplications>0</numActiveApplications>
<numPendingApplications>0</numPendingApplications>
<numContainers>0</numContainers>
<maxApplications>0</maxApplications>
<maxApplicationsPerUser>0</maxApplicationsPerUser>
<maxActiveApplications>1</maxActiveApplications>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<userLimit>100</userLimit>
<userLimitFactor>1.0</userLimitFactor>
</queue>
<queue xsi:type="capacitySchedulerLeafQueueInfo">
<capacity>10.0</capacity>
<usedCapacity>0.0</usedCapacity>
<maxCapacity>100.0</maxCapacity>
<absoluteCapacity>1.0000001</absoluteCapacity>
<absoluteMaxCapacity>15.000001</absoluteMaxCapacity>
<absoluteUsedCapacity>0.0</absoluteUsedCapacity>
<numApplications>0</numApplications>
<usedResources>memory: 0</usedResources>
<queueName>a4</queueName>
<state>RUNNING</state>
<numActiveApplications>0</numActiveApplications>
<numPendingApplications>0</numPendingApplications>
<numContainers>0</numContainers>
<maxApplications>0</maxApplications>
<maxApplicationsPerUser>0</maxApplicationsPerUser>
<maxActiveApplications>1</maxActiveApplications>
<maxActiveApplicationsPerUser>1</maxActiveApplicationsPerUser>
<userLimit>100</userLimit>
<userLimitFactor>1.0</userLimitFactor>
</queue>
</queues>
</queue>
</queues> </queues>
</schedulerInfo> </schedulerInfo>
</scheduler> </scheduler>