Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CFA4717EF1 for ; Fri, 27 Mar 2015 02:33:53 +0000 (UTC) Received: (qmail 34121 invoked by uid 500); 27 Mar 2015 02:33:53 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 34069 invoked by uid 500); 27 Mar 2015 02:33:53 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 34057 invoked by uid 99); 27 Mar 2015 02:33:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2015 02:33:53 +0000 Date: Fri, 27 Mar 2015 02:33:53 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-12413) Mismatch in the equals and hashcode methods of KeyValue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-12413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14383247#comment-14383247 ] Ted Yu commented on HBASE-12413: -------------------------------- lgtm {code} 1068 * In line with {@link #equals(Object)}, only compares the key portion, 1069 * not the value. {code} Looks like the verb 'compares' is not accurate: we're calculating hash code, right ? > Mismatch in the equals and hashcode methods of KeyValue > ------------------------------------------------------- > > Key: HBASE-12413 > URL: https://issues.apache.org/jira/browse/HBASE-12413 > Project: HBase > Issue Type: Bug > Reporter: Jingcheng Du > Assignee: Jingcheng Du > Priority: Minor > Attachments: HBASE-12413-V2.diff, HBASE-12413.diff, HBASE-12413.v3.patch > > > In the equals method of KeyValue only row key is compared, and in the hashcode method all bacing bytes are calculated. This breaks the Java rule. -- This message was sent by Atlassian JIRA (v6.3.4#6332)