|
@@ -87,8 +87,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
int maxApplicationsPerUser;
|
|
|
int userLimit;
|
|
|
float userLimitFactor;
|
|
|
- long defaultApplicationLifetime;
|
|
|
- long maxApplicationLifetime;
|
|
|
}
|
|
|
|
|
|
private static class WebServletModule extends ServletModule {
|
|
@@ -133,8 +131,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
config.setQueues(A, new String[] {"a1", "a2"});
|
|
|
config.setCapacity(A1, 30);
|
|
|
config.setMaximumCapacity(A1, 50);
|
|
|
- config.setMaximumLifetimePerQueue(A2, 100);
|
|
|
- config.setDefaultLifetimePerQueue(A2, 50);
|
|
|
|
|
|
config.setUserLimitFactor(A1, 100.0f);
|
|
|
config.setCapacity(A2, 70);
|
|
@@ -315,10 +311,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
lqi.userLimit = WebServicesTestUtils.getXmlInt(qElem, "userLimit");
|
|
|
lqi.userLimitFactor =
|
|
|
WebServicesTestUtils.getXmlFloat(qElem, "userLimitFactor");
|
|
|
- lqi.defaultApplicationLifetime =
|
|
|
- WebServicesTestUtils.getXmlLong(qElem, "defaultApplicationLifetime");
|
|
|
- lqi.maxApplicationLifetime =
|
|
|
- WebServicesTestUtils.getXmlLong(qElem, "maxApplicationLifetime");
|
|
|
verifyLeafQueueGeneric(q, lqi);
|
|
|
}
|
|
|
}
|
|
@@ -329,7 +321,7 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
JSONObject info = json.getJSONObject("scheduler");
|
|
|
assertEquals("incorrect number of elements in: " + info, 1, info.length());
|
|
|
info = info.getJSONObject("schedulerInfo");
|
|
|
- assertEquals("incorrect number of elements in: " + info, 12, info.length());
|
|
|
+ assertEquals("incorrect number of elements in: " + info, 8, info.length());
|
|
|
verifyClusterSchedulerGeneric(info.getString("type"),
|
|
|
(float) info.getDouble("usedCapacity"),
|
|
|
(float) info.getDouble("capacity"),
|
|
@@ -345,16 +337,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
assertEquals("incorrect number of elements in: " + health, 3,
|
|
|
lastRunDetails.length());
|
|
|
|
|
|
- JSONObject maximumAllocation = info.getJSONObject("maximumAllocation");
|
|
|
- assertEquals("8192", maximumAllocation.getString("memory"));
|
|
|
- assertEquals("4", maximumAllocation.getString("vCores"));
|
|
|
-
|
|
|
- JSONObject queueAcls = info.getJSONObject("queueAcls");
|
|
|
- assertEquals(1, queueAcls.length());
|
|
|
-
|
|
|
- assertEquals("0", info.getString("queuePriority"));
|
|
|
- assertEquals("utilization", info.getString("orderingPolicyInfo"));
|
|
|
-
|
|
|
JSONArray arr = info.getJSONObject("queues").getJSONArray("queue");
|
|
|
assertEquals("incorrect number of elements in: " + arr, 2, arr.length());
|
|
|
|
|
@@ -409,16 +391,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
String q2 = q + "." + obj.getString("queueName");
|
|
|
verifySubQueue(obj, q2, qi.absoluteCapacity, qi.absoluteMaxCapacity);
|
|
|
}
|
|
|
-
|
|
|
- JSONObject maximumAllocation = info.getJSONObject("maximumAllocation");
|
|
|
- assertEquals("8192", maximumAllocation.getString("memory"));
|
|
|
- assertEquals("4", maximumAllocation.getString("vCores"));
|
|
|
-
|
|
|
- JSONObject queueAcls = info.getJSONObject("queueAcls");
|
|
|
- assertEquals(1, queueAcls.length());
|
|
|
-
|
|
|
- assertEquals("0", info.getString("queuePriority"));
|
|
|
- assertEquals("utilization", info.getString("orderingPolicyInfo"));
|
|
|
} else {
|
|
|
Assert.assertEquals("\"type\" field is incorrect",
|
|
|
"capacitySchedulerLeafQueueInfo", info.getString("type"));
|
|
@@ -430,9 +402,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
lqi.maxApplicationsPerUser = info.getInt("maxApplicationsPerUser");
|
|
|
lqi.userLimit = info.getInt("userLimit");
|
|
|
lqi.userLimitFactor = (float) info.getDouble("userLimitFactor");
|
|
|
- lqi.defaultApplicationLifetime =
|
|
|
- info.getLong("defaultApplicationLifetime");
|
|
|
- lqi.maxApplicationLifetime = info.getLong("maxApplicationLifetime");
|
|
|
verifyLeafQueueGeneric(q, lqi);
|
|
|
// resourcesUsed and users (per-user resources used) are checked in
|
|
|
// testPerUserResource()
|
|
@@ -497,15 +466,6 @@ public class TestRMWebServicesCapacitySched extends JerseyTestBase {
|
|
|
info.userLimit);
|
|
|
assertEquals("userLimitFactor doesn't match",
|
|
|
csConf.getUserLimitFactor(q), info.userLimitFactor, 1e-3f);
|
|
|
-
|
|
|
- if (q.equals("root.a.a2")) {
|
|
|
- assertEquals("defaultApplicationLifetime doesn't match",
|
|
|
- csConf.getDefaultLifetimePerQueue(q),
|
|
|
- info.defaultApplicationLifetime);
|
|
|
- assertEquals("maxApplicationLifetime doesn't match",
|
|
|
- csConf.getMaximumLifetimePerQueue(q),
|
|
|
- info.maxApplicationLifetime);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
//Return a child Node of node with the tagname or null if none exists
|