Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A3EAA200BDE for ; Fri, 11 Nov 2016 07:20:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A23A2160B10; Fri, 11 Nov 2016 06:20:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EF7E5160B01 for ; Fri, 11 Nov 2016 07:19:59 +0100 (CET) Received: (qmail 77351 invoked by uid 500); 11 Nov 2016 06:19:59 -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 77310 invoked by uid 99); 11 Nov 2016 06:19:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2016 06:19:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7B2452C4C76 for ; Fri, 11 Nov 2016 06:19:58 +0000 (UTC) Date: Fri, 11 Nov 2016 06:19:58 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-17020) keylen in midkey() dont computed correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 11 Nov 2016 06:20:00 -0000 [ https://issues.apache.org/jira/browse/HBASE-17020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656282#comment-15656282 ] Hudson commented on HBASE-17020: -------------------------------- SUCCESS: Integrated in Jenkins build HBase-1.2-JDK7 #69 (See [https://builds.apache.org/job/HBase-1.2-JDK7/69/]) HBASE-17020 keylen in midkey() dont computed correctly (liyu: rev bf9614f72e3104ec0110ed018fb0b6d0174c6366) * (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java * (edit) hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java * (edit) hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileWriterV2.java > keylen in midkey() dont computed correctly > ------------------------------------------ > > Key: HBASE-17020 > URL: https://issues.apache.org/jira/browse/HBASE-17020 > Project: HBase > Issue Type: Bug > Components: HFile > Affects Versions: 2.0.0, 1.3.0, 1.4.0, 1.1.7, 0.98.23, 1.2.4 > Reporter: Yu Sun > Assignee: Yu Sun > Fix For: 2.0.0, 1.4.0, 1.2.5, 0.98.24, 1.1.8 > > Attachments: HBASE-17020-branch-0.98.patch, HBASE-17020-v1.patch, HBASE-17020-v2.patch, HBASE-17020-v2.patch, HBASE-17020-v3-branch1.1.patch, HBASE-17020.branch-0.98.patch, HBASE-17020.branch-0.98.patch, HBASE-17020.branch-1.1.patch > > > in CellBasedKeyBlockIndexReader.midkey(): > {code} > ByteBuff b = midLeafBlock.getBufferWithoutHeader(); > int numDataBlocks = b.getIntAfterPosition(0); > int keyRelOffset = b.getIntAfterPosition(Bytes.SIZEOF_INT * (midKeyEntry + 1)); > int keyLen = b.getIntAfterPosition(Bytes.SIZEOF_INT * (midKeyEntry + 2)) - keyRelOffset; > {code} > the local varible keyLen get this should be total length of: SECONDARY_INDEX_ENTRY_OVERHEAD + firstKey.length; > the code is: > {code} > void add(byte[] firstKey, long blockOffset, int onDiskDataSize, > long curTotalNumSubEntries) { > // Record the offset for the secondary index > secondaryIndexOffsetMarks.add(curTotalNonRootEntrySize); > curTotalNonRootEntrySize += SECONDARY_INDEX_ENTRY_OVERHEAD > + firstKey.length; > {code} > when the midkey last entry of a leaf-level index block, this may throw: > {quote} > 2016-10-01 12:27:55,186 ERROR [MemStoreFlusher.0] regionserver.MemStoreFlusher: Cache flusher failed for entry [flush region pora_6_item_feature,0061:,1473838922457.12617bc4ebbfd171018bf96ac9bdd2a7.] > java.lang.ArrayIndexOutOfBoundsException > at org.apache.hadoop.hbase.util.ByteBufferUtils.copyFromBufferToArray(ByteBufferUtils.java:936) > at org.apache.hadoop.hbase.nio.SingleByteBuff.toBytes(SingleByteBuff.java:303) > at org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$CellBasedKeyBlockIndexReader.midkey(HFileBlockIndex.java:419) > at org.apache.hadoop.hbase.io.hfile.HFileReaderImpl.midkey(HFileReaderImpl.java:1519) > at org.apache.hadoop.hbase.regionserver.StoreFile$Reader.midkey(StoreFile.java:1520) > at org.apache.hadoop.hbase.regionserver.StoreFile.getFileSplitPoint(StoreFile.java:706) > at org.apache.hadoop.hbase.regionserver.DefaultStoreFileManager.getSplitPoint(DefaultStoreFileManager.java:126) > at org.apache.hadoop.hbase.regionserver.HStore.getSplitPoint(HStore.java:1983) > at org.apache.hadoop.hbase.regionserver.ConstantFamilySizeRegionSplitPolicy.getSplitPoint(ConstantFamilySizeRegionSplitPolicy.java:77) > at org.apache.hadoop.hbase.regionserver.HRegion.checkSplit(HRegion.java:7756) > at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushRegion(MemStoreFlusher.java:513) > at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.flushRegion(MemStoreFlusher.java:471) > at org.apache.hadoop.hbase.regionserver.MemStoreFlusher.access$800(MemStoreFlusher.java:75) > at org.apache.hadoop.hbase.regionserver.MemStoreFlusher$FlushHandler.run(MemStoreFlusher.java:259) > at java.lang.Thread.run(Thread.java:756) > {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)