YARN-10193. FS-CS converter: fix incorrect capacity conversion. Contributed by Peter Bacsko
This commit is contained in:
parent
0fd8bf5f6b
commit
38d87883b6
@ -359,7 +359,7 @@ private Map<String, BigDecimal> getCapacities(int totalWeight,
|
||||
// fix last value if total != 100.000
|
||||
if (!totalPct.equals(hundred)) {
|
||||
BigDecimal tmp = new BigDecimal(0);
|
||||
for (int i = 0; i < children.size() - 2; i++) {
|
||||
for (int i = 0; i < children.size() - 1; i++) {
|
||||
tmp = tmp.add(capacities.get(children.get(i).getQueueName()));
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ public void testChildCapacity() {
|
||||
csConfig.get(PREFIX + "root.default.capacity"));
|
||||
assertEquals("root.admins capacity", "33.333",
|
||||
csConfig.get(PREFIX + "root.admins.capacity"));
|
||||
assertEquals("root.users capacity", "66.667",
|
||||
assertEquals("root.users capacity", "33.334",
|
||||
csConfig.get(PREFIX + "root.users.capacity"));
|
||||
|
||||
// root.users
|
||||
|
Loading…
Reference in New Issue
Block a user