Peter Bacsko created YARN-10193:
-----------------------------------

             Summary: FS-CS converter: fix incorrect capacity conversion
                 Key: YARN-10193
                 URL: https://issues.apache.org/jira/browse/YARN-10193
             Project: Hadoop YARN
          Issue Type: Sub-task
            Reporter: Peter Bacsko
            Assignee: Peter Bacsko


Conversion of capacities are incorrect if the total doesn't add up exactly to 
100.00%.

The loop invariant must be fixed:
{noformat}
 for (int i = 0; i < children.size() - 2; i++) {
{noformat}

The testcase needs to be fixed too:
{noformat}
    assertEquals("root.default capacity", "33.333",
        csConfig.get(PREFIX + "root.default.capacity"));
    assertEquals("root.admins capacity", "33.333",
        csConfig.get(PREFIX + "root.admins.capacity"));
    assertEquals("root.users capacity", "66.667",
        csConfig.get(PREFIX + "root.users.capacity"));
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-dev-h...@hadoop.apache.org

Reply via email to