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

Jim Brennan commented on YARN-9206:
-----------------------------------

[~sunilg], [~kshukla]  While I agree that [~sunilg]'s version looks a little 
cleaner, the addAll() calls are not cheap, especially for the active list, 
which could be thousands of nodes.  I was attempting to do this in as optimally 
a way as possible using the isActive/isInActive approach.  That said, I am OK 
with using this version if that is the consensus.  (I'm more of a C/C++ guy, so 
the ifs and booleans don't offend me so much. :)).

 

 

> RMServerUtils does not count SHUTDOWN as an accepted state
> ----------------------------------------------------------
>
>                 Key: YARN-9206
>                 URL: https://issues.apache.org/jira/browse/YARN-9206
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.0.3
>            Reporter: Kuhu Shukla
>            Assignee: Kuhu Shukla
>            Priority: Major
>         Attachments: YARN-9206.001.patch, YARN-9206.002.patch, 
> YARN-9206.003.patch
>
>
> {code}
> if (acceptedStates.contains(NodeState.DECOMMISSIONED) ||
>         acceptedStates.contains(NodeState.LOST) ||
>         acceptedStates.contains(NodeState.REBOOTED)) {
>       for (RMNode rmNode : context.getInactiveRMNodes().values()) {
>         if ((rmNode != null) && acceptedStates.contains(rmNode.getState())) {
>           results.add(rmNode);
>         }
>       }
>     }
>     return results;
>   }
> {code}
> This should include SHUTDOWN state as they are inactive too. This method is 
> used for node reports and such so might be useful to account for them as well.



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