hbase-commits mailing list archives

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

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

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

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1523123&r1=1523122&r2=1523123&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Fri Sep 13 22:04:29 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