kbendick commented on a change in pull request #4183:
URL: https://github.com/apache/iceberg/pull/4183#discussion_r811525178



##########
File path: 
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/CatalogLoader.java
##########
@@ -155,4 +210,55 @@ public String toString() {
     }
   }
 
+  class BaseCatalogLoader implements CatalogLoader {
+
+    private final Map<String, String> options;
+    private final String catalogName;
+    private final SerializableConfiguration hadoopConf;
+
+    private BaseCatalogLoader(
+            CatalogFactory.Context context
+    ) {
+      this.options = Maps.newHashMap(context.getOptions()); // wrap into a 
hashmap for serialization
+      this.catalogName = context.getName();
+      // Check to see if there are hadoop classes loaded in Flink's 
application classloader
+      if (isHadoopEnv(context.getClassLoader().getParent())) {

Review comment:
       As I mentioned above, we also have an interface marker, 
`org.apache.iceberg.hadoop.Configurable<C>`, which is used for a similar 
purpose (to avoid the dependency on hadoop).
   
   Here's an exmaple usage of it in `GlueCatalog`, though I'm not 100% sure it 
can stand in for this usecase here (but maybe we update it so it can): 
https://github.com/apache/iceberg/blob/8afcdffd905fa284f20f6f84fba649d28fb7d923/aws/src/main/java/org/apache/iceberg/aws/glue/GlueCatalog.java#L76-L82




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to