[ https://issues.apache.org/jira/browse/YARN-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289123#comment-14289123 ]
Varun Saxena commented on YARN-3075: ------------------------------------ bq. 4) In add(remove/replace)NodeToLabels, such null check is not necessary: if (label != null). It will be checked in check... methods in CommonsNodeLabelsManager. That's true. Will remove the additional null check. bq. 1) When op (add/remove/replace) is on a host nodeId.getPort() == WILDCARD_PORT, (of course you need update label->host), you only need update label->Nodes when check node.labels != null is true. I had put it inside node.labels != null condition earlier but this leads to test case failures. If you see the code in {{getNodeLabels}}, you would find that we get host.labels if nodeId doesnt have specific labels associated with it. I on the other hand am storing whatever is required right from the beginning. So dont need to make this decision at the time of call to {{getLabelsToNodes}} So its just a difference in approach. Doesn't lead to any functional issues. Let me know your opinion on this. bq. 3.3 When a label contains (nodeId.port = WILDCARD_PORT), you should add Nodes in the host if (node.labels == null). It is possible a. admin specify host1.label = x; b. nm1 on host1 activated. You should get nm1 when you inquire nodes of label=x. You may need to add a test to TestRMNodeLabelsManager. You can take a look at testNodeActiveDeactiveUpdate Thanks for the input. Yes, activate and deactivate node needs to delete node from labelCollections as well. Will do so. I will modify {{testNodeActiveDeactiveUpdate}} accordingly. > 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)