[
https://issues.apache.org/jira/browse/YARN-9206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755646#comment-16755646
]
Sunil Govindan commented on YARN-9206:
--------------------------------------
Sorry for the delay here.
Yes, addAll has some cost associated with it. However we can get a reference
instead of addAll for activeNodes/inactiveNodes as well. I think its fine as
both are saving some computation cost, and into more readability part of code.
[~kshukla], could u pls check if that possible, meantime if you feel latest
suggestion from [~Jim_Brennan] is also fine, lets go for that as both saves
cost.
> 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]