hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1523124 - /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Date Fri, 13 Sep 2013 22:04:53 GMT
Author: stack
Date: Fri Sep 13 22:04:52 2013
New Revision: 1523124

URL: http://svn.apache.org/r1523124
Log:
HBASE-9520 shortcut split asap while requested splitPoint equals with region's startKey

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1523124&r1=1523123&r2=1523124&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Fri Sep 13 22:04:52 2013
@@ -1944,6 +1944,10 @@ public class HBaseAdmin implements Abort
 
   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);
   }



Mime
View raw message