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 35894D105 for ; Sat, 27 Oct 2012 04:33:20 +0000 (UTC) Received: (qmail 8434 invoked by uid 500); 27 Oct 2012 04:33:18 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 7961 invoked by uid 500); 27 Oct 2012 04:33:17 -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 7794 invoked by uid 99); 27 Oct 2012 04:33:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Oct 2012 04:33:16 +0000 Date: Sat, 27 Oct 2012 04:33:16 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: <1888112957.34674.1351312396522.JavaMail.jiratomcat@arcas> In-Reply-To: <460591868.103019.1348151647575.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HBASE-6846) BitComparator bug - ArrayIndexOutOfBoundsException 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-6846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485352#comment-13485352 ] Hadoop QA commented on HBASE-6846: ---------------------------------- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12551053/6846-trunk.txt against trunk revision . {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 3 new or modified tests. {color:green}+1 hadoop2.0{color}. The patch compiles against the hadoop 2.0 profile. {color:red}-1 javadoc{color}. The javadoc tool appears to have generated 85 warning messages. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:red}-1 findbugs{color}. The patch appears to introduce 3 new Findbugs (version 1.3.9) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.client.TestMultiParallel Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3164//console This message is automatically generated. > BitComparator bug - ArrayIndexOutOfBoundsException > -------------------------------------------------- > > Key: HBASE-6846 > URL: https://issues.apache.org/jira/browse/HBASE-6846 > Project: HBase > Issue Type: Bug > Components: Filters > Affects Versions: 0.94.1 > Environment: HBase 0.94.1 + Hadoop 2.0.0-cdh4.0.1 > Reporter: Lucian George Iordache > Assignee: Lars Hofhansl > Fix For: 0.94.3, 0.96.0 > > Attachments: 6846-trunk.txt, HBASE-6846.patch > > > The HBase 0.94.1 BitComparator introduced a bug in the method "compareTo": > {code} > @Override > public int compareTo(byte[] value, int offset, int length) { > if (length != this.value.length) { > return 1; > } > int b = 0; > //Iterating backwards is faster because we can quit after one non-zero byte. > for (int i = value.length - 1; i >= 0 && b == 0; i--) { > switch (bitOperator) { > case AND: > b = (this.value[i] & value[i+offset]) & 0xff; > break; > case OR: > b = (this.value[i] | value[i+offset]) & 0xff; > break; > case XOR: > b = (this.value[i] ^ value[i+offset]) & 0xff; > break; > } > } > return b == 0 ? 1 : 0; > } > {code} > I've encountered this problem when using a BitComparator with a configured this.value.length=8, and in the HBase table there were KeyValues with keyValue.getBuffer().length=207911 bytes. In this case: > {code} > for (int i = 207910; i >= 0 && b == 0; i--) { > switch (bitOperator) { > case AND: > b = (this.value[207910] ... ==> ArrayIndexOutOfBoundsException > break; > {code} > That loop should use: > {code} > for (int i = length - 1; i >= 0 && b == 0; i--) { (or this.value.length.) > {code} > Should I provide a patch for correcting the problem? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira