Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 48480 invoked from network); 25 Feb 2011 06:13:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 06:13:05 -0000 Received: (qmail 26382 invoked by uid 500); 25 Feb 2011 06:13:04 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 26138 invoked by uid 500); 25 Feb 2011 06:13:03 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 25996 invoked by uid 99); 25 Feb 2011 06:13:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 06:13:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 06:12:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BA9921B6E4A for ; Fri, 25 Feb 2011 06:12:38 +0000 (UTC) Date: Fri, 25 Feb 2011 06:12:38 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <2051229218.15449.1298614358761.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <626842700.2525.1298091098484.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (HADOOP-7151) Document need for stable hashCode() in WritableComparable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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