hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7208) equals() and hashCode() implementation need to change in StandardSocketFactory
Date Mon, 23 May 2011 21:46:47 GMT

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

Todd Lipcon commented on HADOOP-7208:
-------------------------------------

- please use spaces, not tabs for indentation
- should probably remove the comment "dummy hash code"
- in tests, please use assertEquals instead of assertTrue with an == condition. Same for the
false assertion
- to illustrate the bug, does DummySocketFactory need to override anything at all? I think
it could just be an empty subclass. Also, the attached javadoc doesn't represent what it does

> equals() and hashCode() implementation need to change in StandardSocketFactory
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-7208
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7208
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7208.patch
>
>
>   In Hadoop IPC Client, we are using ClientCache which will maintain the HashMap to keep
the Client references.
> private Map<SocketFactory, Client> clients =
>       new HashMap<SocketFactory, Client>();
>  Now let us say, we want use two standard factories with Hadoop. MyStandardSocketFactory
(which extends StandardSocketFactory), and StandardSocketFactory. In this case, because of
equals and hashcode implementation, MyStandardSocketFactory client can be overridden by StandardSocketFactoryClient

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message