Hisoka-X commented on code in PR #7457:
URL: https://github.com/apache/seatunnel/pull/7457#discussion_r1726958288
##########
seatunnel-connectors-v2/connector-file/connector-file-s3/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/s3/catalog/S3FileCatalog.java:
##########
@@ -17,120 +17,14 @@
package org.apache.seatunnel.connectors.seatunnel.file.s3.catalog;
-import org.apache.seatunnel.api.configuration.ReadonlyConfig;
-import org.apache.seatunnel.api.table.catalog.Catalog;
-import org.apache.seatunnel.api.table.catalog.CatalogTable;
-import org.apache.seatunnel.api.table.catalog.TablePath;
-import org.apache.seatunnel.api.table.catalog.exception.CatalogException;
-import
org.apache.seatunnel.api.table.catalog.exception.DatabaseAlreadyExistException;
-import
org.apache.seatunnel.api.table.catalog.exception.DatabaseNotExistException;
-import
org.apache.seatunnel.api.table.catalog.exception.TableAlreadyExistException;
-import org.apache.seatunnel.api.table.catalog.exception.TableNotExistException;
+import
org.apache.seatunnel.connectors.seatunnel.file.catalog.AbstractFileCatalog;
import
org.apache.seatunnel.connectors.seatunnel.file.hadoop.HadoopFileSystemProxy;
-import
org.apache.seatunnel.connectors.seatunnel.file.s3.config.S3ConfigOptions;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.hadoop.fs.LocatedFileStatus;
+public class S3FileCatalog extends AbstractFileCatalog {
+ // TODO: this catalog name conflict with a factory identifier
+ public static final String CATALOG_NAME = "S3File";
-import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
-
-import java.io.IOException;
-import java.util.List;
-
-@AllArgsConstructor
-public class S3FileCatalog implements Catalog {
-
- private final HadoopFileSystemProxy hadoopFileSystemProxy;
- private final ReadonlyConfig readonlyConfig;
-
- @Override
- public void open() throws CatalogException {}
-
- @Override
- public void close() throws CatalogException {
- if (hadoopFileSystemProxy != null) {
- try {
- hadoopFileSystemProxy.close();
- } catch (IOException e) {
- throw new CatalogException(e);
- }
- }
- }
Review Comment:
It seems that `AbstractFileCatalog` does not implement the close method?
Could you help to add it? cc @ruanwenjun
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]