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

Peter Bacsko commented on YARN-10425:
-------------------------------------

Thanks [~shuzirra] for the update. I have a question regarding this:

 
{noformat}
            if (ret == null) {
              //If no rule was applied we return null, to let the engine move 
onto the
              //next placementRule class
              LOG.info("No matching rule found for application '{}', moving to 
next " +
                  "PlacementRule engine", asc.getApplicationName());
            }
        
            if (recovery) {
              if (ret == null || !ret.getQueue().equals(asc.getQueue())) {
                return null;
              }
            }
{noformat}

1. The "recovery" path looks a bit non-straightforward. Could you add some 
comments there?

2. You can merge the two ifs:

{noformat}
if (recovery && (ret == null || !ret.getQueue().equals(asc.getQueue())) { ... }
{noformat}

3. Could you rename "ret" to something else? It's not expressive enough.

4. There some checkstyle warnings, pls fix those as well.


> Replace the legacy placement engine in CS with the new one
> ----------------------------------------------------------
>
>                 Key: YARN-10425
>                 URL: https://issues.apache.org/jira/browse/YARN-10425
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Gergely Pollak
>            Assignee: Gergely Pollak
>            Priority: Major
>         Attachments: YARN-10425.001.patch, YARN-10425.002.patch, 
> YARN-10425.003.patch, YARN-10425.004.patch, YARN-10425.005.patch
>
>
> Remove the UserGroupMapping and ApplicationName mapping classes, and use the 
> new CSMappingPlacementRule instead. Also cleanup the orphan classes which are 
> used by these classes only.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to