diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java index ecdfc82e72c..5787f66203c 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/TableDescriptors.java @@ -54,15 +54,6 @@ public interface TableDescriptors { Map getAll() throws IOException; - /** - * Get Map of all TableDescriptors. Populates the descriptor cache as a - * side effect. - * @return Map of all descriptors. - * @throws IOException - */ - Map getAllDescriptors() - throws IOException; - /** * Add or update descriptor * @param htd Descriptor to set into TableDescriptors diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java index 0d89eefffab..affb684f74a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableStateManager.java @@ -223,7 +223,7 @@ public class TableStateManager { private void fixTableStates(TableDescriptors tableDescriptors, Connection connection) throws IOException { - final Map allDescriptors = tableDescriptors.getAllDescriptors(); + final Map allDescriptors = tableDescriptors.getAll(); final Map states = new HashMap<>(); // NOTE: Ful hbase:meta table scan! MetaTableAccessor.fullScanTables(connection, new MetaTableAccessor.Visitor() { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java index c72b9e0759e..b4b0be0827b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java @@ -248,7 +248,7 @@ public class FSTableDescriptors implements TableDescriptors { * Returns a map from table name to table descriptor for all tables. */ @Override - public Map getAllDescriptors() + public Map getAll() throws IOException { Map tds = new TreeMap<>(); @@ -281,20 +281,6 @@ public class FSTableDescriptors implements TableDescriptors { return tds; } - /** - * Returns a map from table name to table descriptor for all tables. - */ - @Override - public Map getAll() throws IOException { - Map htds = new TreeMap<>(); - Map allDescriptors = getAllDescriptors(); - for (Map.Entry entry : allDescriptors - .entrySet()) { - htds.put(entry.getKey(), entry.getValue()); - } - return htds; - } - /** * Find descriptors by namespace. * @see #get(org.apache.hadoop.hbase.TableName) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java index 91f123fa567..6cd399dfa6f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/MockMasterServices.java @@ -327,11 +327,6 @@ public class MockMasterServices extends MockNoopMasterServices { return null; } - @Override public Map getAllDescriptors() throws IOException { - // noop - return null; - } - @Override public TableDescriptor get(TableName tablename) throws IOException { TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tablename);