Daniel Templeton commented on YARN-6885:

bq. About the comment 4 and 5, I tried the treat these two cases just like 
other cases in previous patch, but the finding-bugs plugin showed that the 
boxing issues might be occurred, so I added the brace and tried to use 
primitive variables.

I see.  Hmmm...  I would suggest that you either use a code block for every 
_case_ (like you did for those two) or just inline the variables.  The 
variables are just there for readability, so if you were to inline them and 
format them thoughtfully, it might be OK.

For 6, I meant this:{code}      } else if ("queue".endsWith(field.getTagName()) 
          "pool".equals(field.getTagName())) {
        loadQueue(queueName, field, minQueueResources, maxQueueResources,
            maxChildQueueResources, queueMaxApps, userMaxApps, queueMaxAMShares,
            queueWeights, queuePolicies, minSharePreemptionTimeouts,
            fairSharePreemptionTimeouts, fairSharePreemptionThresholds,
            queueAcls, resAcls, configuredQueues, reservableQueues,
        isLeaf = false;

> AllocationFileLoaderService.loadQueue() should use a switch statement in the 
> main tag parsing loop instead of the if/else-if/...
> --------------------------------------------------------------------------------------------------------------------------------
>                 Key: YARN-6885
>                 URL: https://issues.apache.org/jira/browse/YARN-6885
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: fairscheduler
>    Affects Versions: 3.0.0-alpha4
>            Reporter: Daniel Templeton
>            Assignee: Yu-Tang Lin
>            Priority: Minor
>              Labels: newbie
>             Fix For: 3.0.0-alpha4
>         Attachments: YARN-6885.005.patch
> {code}      if ("minResources".equals(field.getTagName())) {
>         String text = ((Text)field.getFirstChild()).getData().trim();
>         Resource val =
>             FairSchedulerConfiguration.parseResourceConfigValue(text);
>         minQueueResources.put(queueName, val);
>       } else if ("maxResources".equals(field.getTagName())) {
>       ...{code}

This message was sent by Atlassian JIRA

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