hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-7151) Document need for stable hashCode() in WritableComparable
Date Fri, 25 Feb 2011 06:12:38 GMT

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

Hudson commented on HADOOP-7151:

Integrated in Hadoop-Common-trunk-Commit #511 (See [https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/511/])
    HADOOP-7151. Document need for stable hashCode() in WritableComparable. Contributed by
Dmitriy V. Ryaboy.

> Document need for stable hashCode() in WritableComparable
> ---------------------------------------------------------
>                 Key: HADOOP-7151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7151
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Dmitriy V. Ryaboy
>            Assignee: Dmitriy V. Ryaboy
>            Priority: Minor
>             Fix For: 0.23.0
>         Attachments: HADOOP-7151.patch, HADOOP-7151.patch
> When a Writable is used as a key, HashPartitioner implicitly assumes that hashCode()
will return the same value across different instances of the JVM. This is not a guaranteed
behavior in Java, and Object's default hashCode() does not in fact do this, which can lead
to subtle bugs. This requirement should be explicitly called out.
> In addition the sample MyWritable in the javadoc for WritableComparable does not implement
hashCode() and thus has a bug. That should be fixed.

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


View raw message