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

Wangda Tan commented on YARN-3075:
----------------------------------

{code}
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.
{code}
The problem is not only functional issue. I think two parts of code need to be 
consistent, mostly to avoid misunderstanding and could be easier debug.
- In NodeLabelsManager, when trying to get a labels on a Node, if node.label 
not exist (null), return host.label. And If node and host has same label, we 
should set node.label = null to make structure as simple as possible.
- In NodeLabel, I think we should have similar logic, if a node's label is as 
same as host, we should only store host in NodeLabel.

Sounds good?
Thanks,

> 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