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

Junping Du commented on YARN-4386:
----------------------------------

Thanks [~kshukla] to report this issue and [~sunilg] for review!
I think Recommission event shouldn't be applied on decommissioned nodes as it 
won't have any affect and we'd better to keep consistent with previous behavior 
before graceful decommission comes out.
Thus, I would prefer to change "if (entry.getValue().getState() == 
NodeState.DECOMMISSIONING || entry.getValue().getState() == 
NodeState.DECOMMISSIONED)" to "if (entry.getValue().getState() == 
NodeState.DECOMMISSIONING)" to get rid of InvalidState exception in state 
machine.

> refreshNodesGracefully() looks at active RMNode list for recommissioning 
> decommissioned nodes
> ---------------------------------------------------------------------------------------------
>
>                 Key: YARN-4386
>                 URL: https://issues.apache.org/jira/browse/YARN-4386
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Kuhu Shukla
>            Assignee: Kuhu Shukla
>            Priority: Minor
>         Attachments: YARN-4386-v1.patch
>
>
> In refreshNodesGracefully(), during recommissioning, the entryset from 
> getRMNodes() which has only active nodes (RUNNING, DECOMMISSIONING etc.) is 
> used for checking 'decommissioned' nodes which are present in 
> getInactiveRMNodes() map alone. 
> {code}
> for (Entry<NodeId, RMNode> entry:rmContext.getRMNodes().entrySet()) { 
> .........................
>  // Recommissioning the nodes
>         if (entry.getValue().getState() == NodeState.DECOMMISSIONING
>             || entry.getValue().getState() == NodeState.DECOMMISSIONED) {
>           this.rmContext.getDispatcher().getEventHandler()
>               .handle(new RMNodeEvent(nodeId, RMNodeEventType.RECOMMISSION));
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to