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

Naganarasimha G R commented on YARN-7892:
-----------------------------------------

Thanks [~cheersyang] for the comment as discussed offline, if we consider all 
the 4 then there is no point having equals as we will never use it for 
comparison in any case. For Attribute's expression evaluation depends on 
Operator, NodeAttributeMapping Validation requires to check for unique pair of 
name and prefix, so i need to maintain separate map for it in Manager and hence 
this equals doesn't serve any purpose. Though you can add a utility method to 
compare we cannot use this Object in HashMap structures. Other way out is 
having _value_ out of the NodeAttribute but that too doesn't address the 
complete restrictiveness. And communication objects increases as all the api 
needs to start sending the NodeAttribute -> AttributeValue Pair. 

I have uploaded the patch as part of YARN-6858. But lets have the discussion 
here so that all of us concur on this approach and if need arises will fix all 
the related api as part of this jira. 

cc [~sunilg] 

 

 

> NodeAttributePBImpl does not implement hashcode and Equals properly
> -------------------------------------------------------------------
>
>                 Key: YARN-7892
>                 URL: https://issues.apache.org/jira/browse/YARN-7892
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>            Priority: Major
>         Attachments: YARN-7892-YARN-3409.001.patch, 
> YARN-7892-YARN-3409.002.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to