openinx commented on a change in pull request #1332:
URL: https://github.com/apache/iceberg/pull/1332#discussion_r471903263
##########
File path: flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java
##########
@@ -80,14 +83,17 @@ public FlinkCatalog(
String catalogName,
String defaultDatabase,
String[] baseNamespace,
- Catalog icebergCatalog,
+ CatalogLoader catalogLoader,
+ Configuration hadoopConf,
boolean cacheEnabled) {
super(catalogName, defaultDatabase);
- this.originalCatalog = icebergCatalog;
- this.icebergCatalog = cacheEnabled ? CachingCatalog.wrap(icebergCatalog) :
icebergCatalog;
+ this.hadoopConf = hadoopConf;
+ this.originalCatalog = catalogLoader.loadCatalog(hadoopConf);
Review comment:
Is possible to track only on `Catalog` in this `FlinkCatalog` class ?
For example, we only keep the `icebergCatalog` as the member of this class,
that will be much easier to follow the code ( Introducing two member here
confused me sometime). When `close` the catalog we could make the
`CachingCatalog` to implement `Closeable` inteface.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]