From a7211896dfdf4685cd607ebdc7a412bcfab28b76 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 13 Sep 2013 22:04:52 +0000 Subject: [PATCH] HBASE-9520 shortcut split asap while requested splitPoint equals with region's startKey git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1523124 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index b6072c9145a..a6012d9b12f 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -1944,6 +1944,10 @@ public class HBaseAdmin implements Abortable, Closeable { private void split(final ServerName sn, final HRegionInfo hri, byte[] splitPoint) throws IOException { + if (hri.getStartKey() != null && splitPoint != null && + Bytes.compareTo(hri.getStartKey(), splitPoint) == 0) { + throw new IOException("should not give a splitkey which equals to startkey!"); + } AdminService.BlockingInterface admin = this.connection.getAdmin(sn); ProtobufUtil.split(admin, hri, splitPoint); }