kainoa21 commented on a change in pull request #4183:
URL: https://github.com/apache/iceberg/pull/4183#discussion_r811503577
##########
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:
The intention here is to only check Flink's application-level class
loader (i.e. jars from flink's `/lib` folder). This is important because the
call to retrieve the hadoop conf from the flink environment
(`HadoopUtils.getHadoopConfiguration(GlobalConfiguration.loadConfiguration())`)
does not have access to user level classes.
--
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]