From afca8851319d15ae2631b331aa424102e76469ad Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Thu, 11 Jul 2013 03:23:13 +0000 Subject: [PATCH] HBASE-8856 Crash when attempting split with DelimitedKeyPrefixRegionSplitPolicy (Robert Dyer) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1502094 13f79535-47bb-0310-9956-ffa450edef68 --- .../hbase/regionserver/DelimitedKeyPrefixRegionSplitPolicy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DelimitedKeyPrefixRegionSplitPolicy.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DelimitedKeyPrefixRegionSplitPolicy.java index c0940edb356..6082c52a78e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DelimitedKeyPrefixRegionSplitPolicy.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DelimitedKeyPrefixRegionSplitPolicy.java @@ -69,7 +69,7 @@ public class DelimitedKeyPrefixRegionSplitPolicy extends IncreasingToUpperBoundR @Override protected byte[] getSplitPoint() { byte[] splitPoint = super.getSplitPoint(); - if (delimiter != null) { + if (splitPoint != null && delimiter != null) { //find the first occurrence of delimiter in split point int index = com.google.common.primitives.Bytes.indexOf(splitPoint, delimiter);