code: public Collection<DbAndTable> getTables() throws IOException {
      List<DbAndTable> tables = Lists.newArrayList();
  
      try (AutoReturnableObject<IMetaStoreClient> client = this.clientPool.getClient()) {
        Iterable<String> databases = Iterables.filter(client.get().getAllDatabases(), new Predicate<String>() {
          @Override
          public boolean apply(String db) {
            return HiveDatasetFinder.this.whitelistBlacklist.acceptDb(db);
          }
        });
        for (final String db : databases) {
  
          Iterable<String> tableNames = Iterables.filter(client.get().getAllTables(db), new Predicate<String>() {
            @Override
            public boolean apply(String table) {
              return HiveDatasetFinder.this.whitelistBlacklist.acceptTable(db, table);
            }
          });
          for (String tableName : tableNames) {
            tables.add(new DbAndTable(db, tableName));
          }
        }
      } catch (Exception exc) {
        throw new IOException(exc);
      }
  
      return tables;
    }
docs: Get all tables in db with given table pattern.