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

Yufei Gu commented on YARN-8967:
--------------------------------

Hi [~wilfreds], thanks for the patch.
3) Yeah, the xml DOM looks like a little bit silly. getChildNodes() at least 
should provide an option to return only elements rather than childs mixed with 
elements and texts. I believe some new libs should solve this issue. We could 
do something like this to hide second loop in a method getParentNode(). 
{code}
        Element parentNode = getParentNode(node.getChildNodes());
        PlacementRule parentRule = getParentRule(parentNode, fs);
 {code}
4) That's nice.
5) I do think the current solution is better. Let's ignore this checkstyle 
warning. Just one concern, can we make both member in class RuleMap “final”? So 
that no code can change their value except the constructor.

> Change FairScheduler to use PlacementRule interface
> ---------------------------------------------------
>
>                 Key: YARN-8967
>                 URL: https://issues.apache.org/jira/browse/YARN-8967
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: capacityscheduler, fairscheduler
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Wilfred Spiegelenburg
>            Priority: Major
>         Attachments: YARN-8967.001.patch, YARN-8967.002.patch, 
> YARN-8967.003.patch, YARN-8967.004.patch, YARN-8967.005.patch, 
> YARN-8967.006.patch, YARN-8967.007.patch, YARN-8967.008.patch, 
> YARN-8967.009.patch, YARN-8967.010.patch
>
>
> The PlacementRule interface was introduced to be used by all schedulers as 
> per YARN-3635. The CapacityScheduler is using it but the FairScheduler is not 
> and is using its own rule definition.
> YARN-8948 cleans up the implementation and removes the CS references which 
> should allow this change to go through.
> This would be the first step in using one placement rule engine for both 
> schedulers.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to