public void reset() throws Exception {
    if (clientPool != null) {
      for (String dbName : clientPool.run(client -> client.getAllDatabases())) {
        for (String tblName : clientPool.run(client -> client.getAllTables(dbName))) {
          clientPool.run(client -> {
            client.dropTable(dbName, tblName, true, true, true);
            return null;
          });
        }

        if (!DEFAULT_DATABASE_NAME.equals(dbName)) {
          // Drop cascade, functions dropped by cascade
          clientPool.run(client -> {
            client.dropDatabase(dbName, true, true, true);
            return null;
          });
        }
      }
    }

    Path warehouseRoot = new Path(HIVE_LOCAL_DIR.getAbsolutePath());
    FileSystem fs = Util.getFs(warehouseRoot, hiveConf);
    for (FileStatus fileStatus : fs.listStatus(warehouseRoot)) {
      if (!fileStatus.getPath().getName().equals("derby.log") &&
          !fileStatus.getPath().getName().equals("metastore_db")) {
        fs.delete(fileStatus.getPath(), true);
      }
    }
  }
Starts a TestHiveMetastore with a provided connection pool size and HiveConf.
@param conf The hive configuration to use
@param poolSize The number of threads in the executor pool
iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java