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