Index: src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (revision 1330040) +++ src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (working copy) @@ -731,22 +731,6 @@ } @Test - public void testCreateTableWithEmptyRowInTheSplitKeys() throws IOException{ - byte[] tableName = Bytes.toBytes("testCreateTableWithEmptyRowInTheSplitKeys"); - byte[][] splitKeys = new byte[3][]; - splitKeys[0] = "region1".getBytes(); - splitKeys[1] = HConstants.EMPTY_BYTE_ARRAY; - splitKeys[2] = "region2".getBytes(); - HTableDescriptor desc = new HTableDescriptor(tableName); - desc.addFamily(new HColumnDescriptor("col")); - try { - admin.createTable(desc, splitKeys); - fail("Test case should fail as empty split key is passed."); - } catch (IllegalArgumentException e) { - } - } - - @Test public void testTableExist() throws IOException { final byte [] table = Bytes.toBytes("testTableExist"); boolean exist = false; Index: src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (revision 1330040) +++ src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (working copy) @@ -468,11 +468,11 @@ // Verify there are no duplicate split keys byte [] lastKey = null; for(byte [] splitKey : splitKeys) { - if (Bytes.compareTo(splitKey, HConstants.EMPTY_BYTE_ARRAY) == 0) { + if (splitKeys.length == 1 && Bytes.compareTo(splitKey, HConstants.EMPTY_BYTE_ARRAY) == 0) { throw new IllegalArgumentException( - "Empty split key must not be passed in the split keys."); + "Empty split key must not be passed in the split keys alone."); } - if(lastKey != null && Bytes.equals(splitKey, lastKey)) { + if (lastKey != null && Bytes.equals(splitKey, lastKey)) { throw new IllegalArgumentException("All split keys must be unique, " + "found duplicate: " + Bytes.toStringBinary(splitKey) + ", " + Bytes.toStringBinary(lastKey)); Index: src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (revision 1330040) +++ src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (working copy) @@ -1775,7 +1775,10 @@ ZKAssign.asyncCreateNodeOffline(master.getZooKeeper(), state.getRegion(), this.master.getServerName(), cb, ctx); } catch (KeeperException e) { - master.abort("Unexpected ZK exception creating/setting node OFFLINE", e); + if (e instanceof NodeExistsException) { + LOG.warn("Node for " + state.getRegion() + " already exists"); + } + else master.abort("Unexpected ZK exception creating/setting node OFFLINE", e); return false; } return true;