FangYongs commented on code in PR #23063:
URL: https://github.com/apache/flink/pull/23063#discussion_r1283909486
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FileCatalogStoreFactory.java:
##########
@@ -20,42 +20,39 @@
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.ReadableConfig;
-import org.apache.flink.table.catalog.exceptions.CatalogException;
import org.apache.flink.table.factories.CatalogStoreFactory;
-import org.apache.flink.table.factories.FactoryUtil;
+import org.apache.flink.table.factories.FactoryUtil.FactoryHelper;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import static
org.apache.flink.table.catalog.FileCatalogStoreFactoryOptions.CHARSET;
import static
org.apache.flink.table.catalog.FileCatalogStoreFactoryOptions.IDENTIFIER;
import static
org.apache.flink.table.catalog.FileCatalogStoreFactoryOptions.PATH;
import static
org.apache.flink.table.factories.FactoryUtil.createCatalogStoreFactoryHelper;
-/** CatalogStore factory for {@link FileCatalogStore}. */
+/** Catalog store factory for {@link FileCatalogStore}. */
public class FileCatalogStoreFactory implements CatalogStoreFactory {
private String path;
- private String charset;
-
@Override
public CatalogStore createCatalogStore() {
- return new FileCatalogStore(path, charset);
+ return new FileCatalogStore(path);
}
@Override
- public void open(Context context) throws CatalogException {
- FactoryUtil.FactoryHelper factoryHelper =
createCatalogStoreFactoryHelper(this, context);
+ public void open(Context context) {
+ FactoryHelper<CatalogStoreFactory> factoryHelper =
+ createCatalogStoreFactoryHelper(this, context);
factoryHelper.validate();
- ReadableConfig options = factoryHelper.getOptions();
+ ReadableConfig options = factoryHelper.getOptions();
path = options.get(PATH);
- charset = options.get(CHARSET);
}
@Override
- public void close() throws CatalogException {}
+ public void close() {}
Review Comment:
Call super.close()
--
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]