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 6662D107C1 for ; Thu, 18 Dec 2014 17:03:14 +0000 (UTC) Received: (qmail 82332 invoked by uid 500); 18 Dec 2014 17:03:14 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 82281 invoked by uid 500); 18 Dec 2014 17:03:14 -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 82262 invoked by uid 99); 18 Dec 2014 17:03:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Dec 2014 17:03:14 +0000 Date: Thu, 18 Dec 2014 17:03:14 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-12716) A bug in RegionSplitter.UniformSplit algorithm 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-12716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-12716: --------------------------- Description: I`m working for another issues HBASE-12590 and trying to use the UniformSplit algorithm in RegionSplitter. When the last bytes of start key and end key are adjacent in alphabetical order or ASCII order, the UniformSplit algorithm meet an NPE. Like startkey: aaa, endkey :aab startkey:1111 endkey: 1112 For example, we write this simple test code: {code} import org.apache.hadoop.hbase.util.RegionSplitter.UniformSplit; ...... byte[] a1 = { 'a', 'a', 'a' }; byte[] a2 = { 'a', 'a', 'b' }; UniformSplit us = new UniformSplit(); byte[] mid = us.split(a1, a2); ...... {code} We will get the ERROR: {code} Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.util.RegionSplitter$UniformSplit.split(RegionSplitter.java:986) {code} We hope this algorithm should be able to calculate the split point with an additional byte. for example: "aaa" and "aab", split point= "aaaP" "1111" and "1112", split point ="1111P" was: I`m working for another issues HBASE-12590 and trying to use the UniformSplit algorithm in RegionSplitter. When the last bytes of start key and end key are adjacent in alphabetical order or ASCII order, the UniformSplit algorithm meet an NPE. Like startkey: aaa, endkey :aab startkey:1111 endkey: 1112 For example, we write this simple test code: import org.apache.hadoop.hbase.util.RegionSplitter.UniformSplit; ...... byte[] a1 = { 'a', 'a', 'a' }; byte[] a2 = { 'a', 'a', 'b' }; UniformSplit us = new UniformSplit(); byte[] mid = us.split(a1, a2); ...... ------------------------------------------------------------------ We will get the ERROR: Exception in thread "main" java.lang.NullPointerException at org.apache.hadoop.hbase.util.RegionSplitter$UniformSplit.split(RegionSplitter.java:986) We hope this algorithm should be able to calculate the split point with an additional byte. for example: "aaa" and "aab", split point= "aaaP" "1111" and "1112", split point ="1111P" > A bug in RegionSplitter.UniformSplit algorithm > ---------------------------------------------- > > Key: HBASE-12716 > URL: https://issues.apache.org/jira/browse/HBASE-12716 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.98.6 > Reporter: Weichen Ye > > I`m working for another issues HBASE-12590 and trying to use the UniformSplit algorithm in RegionSplitter. When the last bytes of start key and end key are adjacent in alphabetical order or ASCII order, the UniformSplit algorithm meet an NPE. > Like startkey: aaa, endkey :aab > startkey:1111 endkey: 1112 > For example, we write this simple test code: > {code} > import org.apache.hadoop.hbase.util.RegionSplitter.UniformSplit; > ...... > byte[] a1 = { 'a', 'a', 'a' }; > byte[] a2 = { 'a', 'a', 'b' }; > UniformSplit us = new UniformSplit(); > byte[] mid = us.split(a1, a2); > ...... > {code} > We will get the ERROR: > {code} > Exception in thread "main" java.lang.NullPointerException > at org.apache.hadoop.hbase.util.RegionSplitter$UniformSplit.split(RegionSplitter.java:986) > {code} > We hope this algorithm should be able to calculate the split point with an additional byte. for example: > "aaa" and "aab", split point= "aaaP" > "1111" and "1112", split point ="1111P" -- This message was sent by Atlassian JIRA (v6.3.4#6332)