hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naganarasimha G R (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7892) NodeAttributePBImpl does not implement hashcode and Equals properly
Date Tue, 13 Feb 2018 00:34:00 GMT

    [ 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

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

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

View raw message