Skip to content

Commit

Permalink
Revert "Hive: close the fileIO client when closing the hive catalog (#…
Browse files Browse the repository at this point in the history
…10771)"

This reverts commit 7e2920a.
  • Loading branch information
Fokko committed Dec 23, 2024
1 parent f7748f2 commit c80bb0b
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public class HiveCatalog extends BaseMetastoreViewCatalog
private ClientPool<IMetaStoreClient, TException> clients;
private boolean listAllTables = false;
private Map<String, String> catalogProperties;
private FileIOTracker fileIOTracker;

public HiveCatalog() {}

Expand Down Expand Up @@ -125,7 +124,6 @@ public void initialize(String inputName, Map<String, String> properties) {
: CatalogUtil.loadFileIO(fileIOImpl, properties, conf);

this.clients = new CachedClientPool(conf, properties);
this.fileIOTracker = new FileIOTracker();
}

@Override
Expand Down Expand Up @@ -666,10 +664,7 @@ private boolean isValidateNamespace(Namespace namespace) {
public TableOperations newTableOps(TableIdentifier tableIdentifier) {
String dbName = tableIdentifier.namespace().level(0);
String tableName = tableIdentifier.name();
HiveTableOperations ops =
new HiveTableOperations(conf, clients, fileIO, name, dbName, tableName);
fileIOTracker.track(ops);
return ops;
return new HiveTableOperations(conf, clients, fileIO, name, dbName, tableName);
}

@Override
Expand Down Expand Up @@ -798,14 +793,6 @@ protected Map<String, String> properties() {
return catalogProperties == null ? ImmutableMap.of() : catalogProperties;
}

@Override
public void close() throws IOException {
super.close();
if (fileIOTracker != null) {
fileIOTracker.close();
}
}

@VisibleForTesting
void setListAllTables(boolean listAllTables) {
this.listAllTables = listAllTables;
Expand Down

0 comments on commit c80bb0b

Please sign in to comment.