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

Yufei Gu commented on YARN-9298:
--------------------------------

Hi [~wilfreds], thanks for splitting and provide the patch. Some comments:
1. Can you add a “@Private” and  “@Unstable” notations to all new classes? Can 
you do the same to class PlacementFactory and PlacementRule since you are 
changing them?
2. I guess you didn’t bring in unit tests due to the splitting. I just feel 
uncomfortable to push so many changes without adding any unit test. Can you add 
unit tests in this jira? it is quit practical to add unit tests for methods in 
class {{FairQueuePlacementUtils}}, may be a little bit trickier for other 
classes.
3. There is one extra empty line at the end of class “PlacementFactory”
4. Can you use the org.apache.hadoop.util.ReflectionUtils to get a new instance 
rather than the code in getPlacementRule()?
5. {{public static <T> T getPlacementRule(Class<T> theClass,…)}} could be 
{{public static PlacementRule getPlacementRule(Class<T? extends PlacementRule> 
theClass }} to enforce the type.
6. It is obvious to developers that getting placement is “getting queues”, but 
still looks confusing to code reader. Can we clarify that here?  {{* Get queue 
for a given application.}}
7. LOG name is wrong in class {{FairQueuePlacementUtils}}
8. In methods {{initialize()}}, there is no need to log error since you’ve 
raised exceptions.

> 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
>
>
> 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]

Reply via email to