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 @@ public class FSQueueConverter {
|
|||||||
// fix last value if total != 100.000
|
// fix last value if total != 100.000
|
||||||
if (!totalPct.equals(hundred)) {
|
if (!totalPct.equals(hundred)) {
|
||||||
BigDecimal tmp = new BigDecimal(0);
|
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()));
|
tmp = tmp.add(capacities.get(children.get(i).getQueueName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ public class TestFSQueueConverter {
|
|||||||
csConfig.get(PREFIX + "root.default.capacity"));
|
csConfig.get(PREFIX + "root.default.capacity"));
|
||||||
assertEquals("root.admins capacity", "33.333",
|
assertEquals("root.admins capacity", "33.333",
|
||||||
csConfig.get(PREFIX + "root.admins.capacity"));
|
csConfig.get(PREFIX + "root.admins.capacity"));
|
||||||
assertEquals("root.users capacity", "66.667",
|
assertEquals("root.users capacity", "33.334",
|
||||||
csConfig.get(PREFIX + "root.users.capacity"));
|
csConfig.get(PREFIX + "root.users.capacity"));
|
||||||
|
|
||||||
// root.users
|
// root.users
|
||||||
|
Loading…
x
Reference in New Issue
Block a user