[
https://issues.apache.org/jira/browse/YARN-9298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16780302#comment-16780302
]
Yufei Gu commented on YARN-9298:
--------------------------------
Hi [~wilfreds], thanks for the patch. I am glad we are moving forward.
1. The current implementations of multiple FS rules are still kind of verbose.
I think a new abstract class like this “{{public abstract class
FairPlacemenRule extends PlacementRule}}” can solve the duplication. It can
contain not only 3 {{setConfig()}} in it, but also all fair scheduler rules
related methods and variables. The method {{initialize}} can have a default
implementation as well. So that we can leave class PlacementRule as it is. And
in method getPlacementRule, some minor changes are needed.
2. There is an unused import in class TestFairQueuePlacementUtils.
3. If a switch statement isn’t suit here. I personally prefer {{if {} else if
{} else {}}} rather than {{if {} else { if {} else {}}}} in this case, which
looks cleaner by reducing nested level. However, I won’t insist on this.
> Implement FS placement rules using PlacementRule interface
> ----------------------------------------------------------
>
> Key: YARN-9298
> URL: https://issues.apache.org/jira/browse/YARN-9298
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: scheduler
> Reporter: Wilfred Spiegelenburg
> Assignee: Wilfred Spiegelenburg
> Priority: Major
> Attachments: YARN-9298.001.patch, YARN-9298.002.patch,
> YARN-9298.003.patch
>
>
> Implement existing placement rules of the FS using the PlacementRule
> interface.
> Preparation for YARN-8967
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]