diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java index 3227f228a1d..ea75f6086ce 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java @@ -221,18 +221,6 @@ public interface AsyncAdmin { */ CompletableFuture isTableAvailable(TableName tableName); - /** - * Use this api to check if the table has been created with the specified number of splitkeys - * which was used while creating the given table. Note : If this api is used after a table's - * region gets splitted, the api may return false. The return value will be wrapped by a - * {@link CompletableFuture}. - * @param tableName name of table to check - * @param splitKeys keys to check if the table has been created with all split keys - * @deprecated Since 2.2.0. Will be removed in 3.0.0. Use {@link #isTableAvailable(TableName)} - */ - @Deprecated - CompletableFuture isTableAvailable(TableName tableName, byte[][] splitKeys); - /** * Add a column family to an existing table. * @param tableName name of the table to add column family to diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java index 07b4311a980..668e729a0ad 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncHBaseAdmin.java @@ -176,11 +176,6 @@ class AsyncHBaseAdmin implements AsyncAdmin { return wrap(rawAdmin.isTableAvailable(tableName)); } - @Override - public CompletableFuture isTableAvailable(TableName tableName, byte[][] splitKeys) { - return wrap(rawAdmin.isTableAvailable(tableName, splitKeys)); - } - @Override public CompletableFuture addColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) { diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java index 085fcf72a27..248e7327236 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java @@ -687,13 +687,6 @@ class RawAsyncHBaseAdmin implements AsyncAdmin { return isTableAvailable(tableName, Optional.empty()); } - @Override - public CompletableFuture isTableAvailable(TableName tableName, byte[][] splitKeys) { - Preconditions.checkNotNull(splitKeys, "splitKeys is null. If you don't specify splitKeys," - + " use isTableAvailable(TableName) instead"); - return isTableAvailable(tableName, Optional.of(splitKeys)); - } - private CompletableFuture isTableAvailable(TableName tableName, Optional splitKeys) { if (TableName.isMetaTableName(tableName)) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java index 990eed424d3..e1eaca73a8a 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi.java @@ -133,7 +133,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase { boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(TEST_UTIL.getConfiguration()); createTableWithDefaultConf(tableName, splitKeys); - boolean tableAvailable = admin.isTableAvailable(tableName, splitKeys).get(); + boolean tableAvailable = admin.isTableAvailable(tableName).get(); assertTrue("Table should be created with splitKyes + 1 rows in META", tableAvailable); AsyncTable metaTable = ASYNC_CONN.getTable(META_TABLE_NAME); @@ -406,7 +406,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase { assertEquals(NUM_REGIONS, TEST_UTIL.getHBaseCluster().getRegions(tableName).size()); assertTrue("Table should be created with splitKyes + 1 rows in META", - admin.isTableAvailable(tableName, splitKeys).get()); + admin.isTableAvailable(tableName).get()); // Clone & Verify admin.cloneTableSchema(tableName, newTableName, preserveSplits).join(); @@ -421,7 +421,7 @@ public class TestAsyncTableAdminApi extends TestAsyncAdminBase { if (preserveSplits) { assertEquals(NUM_REGIONS, TEST_UTIL.getHBaseCluster().getRegions(newTableName).size()); assertTrue("New table should be created with splitKyes + 1 rows in META", - admin.isTableAvailable(newTableName, splitKeys).get()); + admin.isTableAvailable(newTableName).get()); } else { assertEquals(1, TEST_UTIL.getHBaseCluster().getRegions(newTableName).size()); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi2.java index 63ff3e48ade..4f5cbf219d6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi2.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncTableAdminApi2.java @@ -209,16 +209,6 @@ public class TestAsyncTableAdminApi2 extends TestAsyncAdminBase { } } - - @Test - public void testTableAvailableWithRandomSplitKeys() throws Exception { - createTableWithDefaultConf(tableName); - byte[][] splitKeys = new byte[1][]; - splitKeys = new byte[][] { new byte[] { 1, 1, 1 }, new byte[] { 2, 2, 2 } }; - boolean tableAvailable = admin.isTableAvailable(tableName, splitKeys).get(); - assertFalse("Table should be created with 1 row in META", tableAvailable); - } - @Test public void testCompactionTimestamps() throws Exception { createTableWithDefaultConf(tableName);