Skip to content

Commit

Permalink
Add a close implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongyeon committed Aug 22, 2024
1 parent 1bacc3f commit 46ad455
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import lombok.SneakyThrows;

import java.io.IOException;
import java.util.List;

public abstract class AbstractFileCatalog implements Catalog {
Expand All @@ -51,7 +52,15 @@ protected AbstractFileCatalog(
public void open() throws CatalogException {}

@Override
public void close() throws CatalogException {}
public void close() throws CatalogException {
if (hadoopFileSystemProxy != null) {
try {
hadoopFileSystemProxy.close();
} catch (IOException e) {
throw new CatalogException(e);
}
}
}

@Override
public String name() {
Expand Down

0 comments on commit 46ad455

Please sign in to comment.