You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Yufei Gu (JIRA)" <ji...@apache.org> on 2017/10/20 21:18:00 UTC

[jira] [Commented] (YARN-7374) Improve performance of DRF comparisons for resource types in fair scheduler

    [ https://issues.apache.org/jira/browse/YARN-7374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16213254#comment-16213254 ] 

Yufei Gu commented on YARN-7374:
--------------------------------

Thanks for working on this [~templedf]. The patch looks good to me generally. Some nits:
- Would you like to publish the performance comparison result?
- remove "* @param n the number of resource types" for method {{compare2()}} 
- Two empty lines before "// A queue is needy for its min share if its dominant resource".
- Code would be cleaner if putting method {{compare2}} and its support methods to a separated class.
- Maybe a good idea to add comment to indicate how to get non-dominate index, or a new method like {{getNonDominateIndex(int dominant) { return 1 - dominant}}}.
- Could these code be put into separated method? Since it is invoked several times. 
{code}
      if (res == 0) {
        // Apps are tied in fairness ratio. Break the tie by submit time and job
        // name to get a deterministic ordering, which is useful for unit tests.
        res = (int) Math.signum(s1.getStartTime() - s2.getStartTime());

        if (res == 0) {
          res = s1.getName().compareTo(s2.getName());
        }
      }
{code}


> Improve performance of DRF comparisons for resource types in fair scheduler
> ---------------------------------------------------------------------------
>
>                 Key: YARN-7374
>                 URL: https://issues.apache.org/jira/browse/YARN-7374
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: fairscheduler
>    Affects Versions: 3.1.0
>            Reporter: Daniel Templeton
>            Assignee: Daniel Templeton
>            Priority: Critical
>         Attachments: YARN-7374.001.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org