hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12716) A bug in RegionSplitter.UniformSplit algorithm
Date Fri, 02 Jan 2015 17:58:35 GMT

    [ https://issues.apache.org/jira/browse/HBASE-12716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14263087#comment-14263087
] 

Hudson commented on HBASE-12716:
--------------------------------

SUCCESS: Integrated in HBase-1.0 #625 (See [https://builds.apache.org/job/HBase-1.0/625/])
HBASE-12716 A bug in RegionSplitter.UniformSplit algorithm (Weichen Ye) (tedyu: rev 0256cdd1b408d431170cc46711f2d9ad561b3ef2)
* hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
* hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java
* hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitter.java


> 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: 2.0.0, 0.98.6
>            Reporter: Weichen Ye
>            Assignee: Weichen Ye
>             Fix For: 1.0.0, 2.0.0, 0.98.10, 1.1.0
>
>         Attachments: HBASE-12716-v2.patch, HBASE-12716.patch
>
>
> Welcome to the review board: https://reviews.apache.org/r/29424/diff/#
> 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" 
> review board:https://reviews.apache.org/r/29424/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message