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

Varun Saxena commented on YARN-3075:
------------------------------------

[~sunilg], thanks for your comments.

bq.  same as calling removeNodeFromLabels(node, oldLabels); 
addNodeToLabels(node, newLabels);
Yes you are correct, replaceNodeFromLabels can be removed.

bq. Possible NPE from nodeLabelInfo ?
Yes, there should be a null check

bq. host.nms.entrySet() will come with all NodeID's rt?
Sorry didn't get what you meant. We can probably pass the host into the 
function and loop over host.nms but that will be reduplicating code.

bq. Why newInstance is needed?
Actually NodeId contains proto as well. This means this object can be accessed 
from multiple threads. This NodeId though comes from request flow and hence may 
not be accessed again. Will recheck and update. 






> NodeLabelsManager implementation to retrieve label to node mapping
> ------------------------------------------------------------------
>
>                 Key: YARN-3075
>                 URL: https://issues.apache.org/jira/browse/YARN-3075
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>    Affects Versions: 2.7.0
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>         Attachments: YARN-3075.001.patch
>
>




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

Reply via email to