[ https://issues.apache.org/jira/browse/YARN-4719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15191351#comment-15191351 ]
Wangda Tan commented on YARN-4719: ---------------------------------- Looks good to me in general, +1 One nit: CS#reintializeQueues: {code} root.reinitialize(newRoot, getClusterResource()); updatePlacementRules(); // Re-calculate headroom for active applications Resource clusterResource = nodeTracker.getClusterCapacity(); {code} Should use getClusterResource instead of nodeTracker.getClusterCapacity. bq. Can we make ClusterNodeTracker an interface and make the current one in latest patch a Default Implementation ? I would suggest keep it as-is, we can refactor it in the future when we have to. Modifying interface needs some additional efforts, we should avoid them now. > Add a helper library to maintain node state and allows common queries > --------------------------------------------------------------------- > > Key: YARN-4719 > URL: https://issues.apache.org/jira/browse/YARN-4719 > Project: Hadoop YARN > Issue Type: Improvement > Components: scheduler > Affects Versions: 2.8.0 > Reporter: Karthik Kambatla > Assignee: Karthik Kambatla > Attachments: yarn-4719-1.patch, yarn-4719-2.patch, yarn-4719-3.patch, > yarn-4719-4.patch, yarn-4719-5.patch > > > The scheduler could use a helper library to maintain node state and allowing > matching/sorting queries. Several reasons for this: > # Today, a lot of the node state management is done separately in each > scheduler. Having a single library will take us that much closer to reducing > duplication among schedulers. > # Adding a filtering/matching API would simplify node labels and locality > significantly. > # An API that returns a sorted list for a custom comparator would help > YARN-1011 where we want to sort by allocation and utilization for > continuous/asynchronous and opportunistic scheduling respectively. -- This message was sent by Atlassian JIRA (v6.3.4#6332)