YARN-1044. used/min/max resources do not display info in the scheduler page (Sangjin Lee via Sandy Ryza)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1531449 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c89a36106e
commit
ae42ecbc01
|
@ -90,6 +90,10 @@ Release 2.2.1 - UNRELEASED
|
|||
YARN-1284. LCE: Race condition leaves dangling cgroups entries for killed
|
||||
containers. (Alejandro Abdelnur via Sandy Ryza)
|
||||
|
||||
YARN-1044. used/min/max resources do not display info in the scheduler page
|
||||
(Sangjin Lee via Sandy Ryza)
|
||||
|
||||
>>>>>>> .merge-right.r1531447
|
||||
Release 2.2.0 - 2013-10-13
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -109,7 +109,7 @@ class CapacitySchedulerPage extends RmView {
|
|||
_("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)).
|
||||
_("Absolute Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)).
|
||||
_("Absolute Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)).
|
||||
_("Used Resources:", StringEscapeUtils.escapeHtml(lqinfo.getUsedResources().toString())).
|
||||
_("Used Resources:", StringEscapeUtils.escapeHtml(lqinfo.getResourcesUsed().toString())).
|
||||
_("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
|
||||
_("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
|
||||
_("Num Containers:", Integer.toString(lqinfo.getNumContainers())).
|
||||
|
|
|
@ -22,6 +22,7 @@ import static org.apache.hadoop.yarn.util.StringHelper.join;
|
|||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.FairSchedulerInfo;
|
||||
|
@ -64,11 +65,14 @@ public class FairSchedulerPage extends RmView {
|
|||
@Override
|
||||
protected void render(Block html) {
|
||||
ResponseInfo ri = info("\'" + qinfo.getQueueName() + "\' Queue Status").
|
||||
_("Used Resources:", qinfo.getUsedResources().toString()).
|
||||
_("Used Resources:", StringEscapeUtils.escapeHtml(
|
||||
qinfo.getUsedResources().toString())).
|
||||
_("Num Active Applications:", qinfo.getNumActiveApplications()).
|
||||
_("Num Pending Applications:", qinfo.getNumPendingApplications()).
|
||||
_("Min Resources:", qinfo.getMinResources().toString()).
|
||||
_("Max Resources:", qinfo.getMaxResources().toString());
|
||||
_("Min Resources:", StringEscapeUtils.escapeHtml(
|
||||
qinfo.getMinResources().toString())).
|
||||
_("Max Resources:", StringEscapeUtils.escapeHtml(
|
||||
qinfo.getMaxResources().toString()));
|
||||
int maxApps = qinfo.getMaxApplications();
|
||||
if (maxApps < Integer.MAX_VALUE) {
|
||||
ri._("Max Running Applications:", qinfo.getMaxApplications());
|
||||
|
|
|
@ -44,7 +44,6 @@ public class CapacitySchedulerQueueInfo {
|
|||
protected float absoluteMaxCapacity;
|
||||
protected float absoluteUsedCapacity;
|
||||
protected int numApplications;
|
||||
protected String usedResources;
|
||||
protected String queueName;
|
||||
protected QueueState state;
|
||||
protected CapacitySchedulerQueueInfoList queues;
|
||||
|
@ -67,7 +66,6 @@ public class CapacitySchedulerQueueInfo {
|
|||
absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
|
||||
absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
|
||||
numApplications = q.getNumApplications();
|
||||
usedResources = q.getUsedResources().toString();
|
||||
queueName = q.getQueueName();
|
||||
state = q.getState();
|
||||
resourcesUsed = new ResourceInfo(q.getUsedResources());
|
||||
|
@ -101,10 +99,6 @@ public class CapacitySchedulerQueueInfo {
|
|||
return numApplications;
|
||||
}
|
||||
|
||||
public String getUsedResources() {
|
||||
return usedResources;
|
||||
}
|
||||
|
||||
public String getQueueName() {
|
||||
return this.queueName;
|
||||
}
|
||||
|
|
|
@ -75,7 +75,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
|
|||
float absoluteMaxCapacity;
|
||||
float absoluteUsedCapacity;
|
||||
int numApplications;
|
||||
String usedResources;
|
||||
String queueName;
|
||||
String state;
|
||||
}
|
||||
|
@ -283,8 +282,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
|
|||
WebServicesTestUtils.getXmlFloat(qElem, "absoluteUsedCapacity");
|
||||
qi.numApplications =
|
||||
WebServicesTestUtils.getXmlInt(qElem, "numApplications");
|
||||
qi.usedResources =
|
||||
WebServicesTestUtils.getXmlString(qElem, "usedResources");
|
||||
qi.queueName = WebServicesTestUtils.getXmlString(qElem, "queueName");
|
||||
qi.state = WebServicesTestUtils.getXmlString(qElem, "state");
|
||||
verifySubQueueGeneric(q, qi, parentAbsCapacity, parentAbsMaxCapacity);
|
||||
|
@ -360,10 +357,10 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
|
|||
private void verifySubQueue(JSONObject info, String q,
|
||||
float parentAbsCapacity, float parentAbsMaxCapacity)
|
||||
throws JSONException, Exception {
|
||||
int numExpectedElements = 12;
|
||||
int numExpectedElements = 11;
|
||||
boolean isParentQueue = true;
|
||||
if (!info.has("queues")) {
|
||||
numExpectedElements = 22;
|
||||
numExpectedElements = 21;
|
||||
isParentQueue = false;
|
||||
}
|
||||
assertEquals("incorrect number of elements", numExpectedElements, info.length());
|
||||
|
@ -376,7 +373,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
|
|||
qi.absoluteMaxCapacity = (float) info.getDouble("absoluteMaxCapacity");
|
||||
qi.absoluteUsedCapacity = (float) info.getDouble("absoluteUsedCapacity");
|
||||
qi.numApplications = info.getInt("numApplications");
|
||||
qi.usedResources = info.getString("usedResources");
|
||||
qi.queueName = info.getString("queueName");
|
||||
qi.state = info.getString("state");
|
||||
|
||||
|
@ -431,8 +427,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTest {
|
|||
assertEquals("absoluteUsedCapacity doesn't match",
|
||||
0, info.absoluteUsedCapacity, 1e-3f);
|
||||
assertEquals("numApplications doesn't match", 0, info.numApplications);
|
||||
assertTrue("usedResources doesn't match ",
|
||||
info.usedResources.matches("<memory:0, vCores:0>"));
|
||||
assertTrue("queueName doesn't match, got: " + info.queueName
|
||||
+ " expected: " + q, qshortName.matches(info.queueName));
|
||||
assertTrue("state doesn't match",
|
||||
|
|
Loading…
Reference in New Issue