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
This commit is contained in:
Michael Stack 2013-09-13 22:04:52 +00:00
parent 8b2d961c48
commit a7211896df
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}