public static Map<TableName, TableState> getTableStates(Connection conn) throws IOException {
    final Map<TableName, TableState> states = new LinkedHashMap<>();
    ClientMetaTableAccessor.Visitor collector = r -> {
      TableState state = CatalogFamilyFormat.getTableState(r);
      if (state != null) {
        states.put(state.getTableName(), state);
      }
      return true;
    };
    fullScanTables(conn, collector);
    return states;
  }
Fetch table states from META table
@param conn connection to use
@return map {tableName -&gt; state}
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java