tchivs commented on code in PR #8193:
URL: https://github.com/apache/paimon/pull/8193#discussion_r3410745523


##########
paimon-common/src/main/java/org/apache/paimon/catalog/CatalogContext.java:
##########
@@ -45,19 +45,22 @@ public class CatalogContext implements Serializable {
     private static final long serialVersionUID = 1L;
 
     private final Options options;
-    private final SerializableConfiguration hadoopConf;
+    @Nullable private final SerializableConfiguration hadoopConf;
     @Nullable private final FileIOLoader preferIOLoader;
     @Nullable private final FileIOLoader fallbackIOLoader;
 
     private CatalogContext(
             Options options,
             @Nullable Configuration hadoopConf,
+            boolean loadHadoopConf,
             @Nullable FileIOLoader preferIOLoader,
             @Nullable FileIOLoader fallbackIOLoader) {
         this.options = checkNotNull(options);
         this.hadoopConf =
-                new SerializableConfiguration(
-                        hadoopConf == null ? getHadoopConfiguration(options) : 
hadoopConf);
+                hadoopConf == null && !loadHadoopConf
+                        ? null
+                        : new SerializableConfiguration(

Review Comment:
   Thanks for the suggestion. I updated this in 8924d69d8: the extra 
loadHadoopConf flag and createWithoutHadoop API were removed, and 
CatalogContext now uses a private helper to load Hadoop configuration with 
try/catch. If Hadoop classes are not available, the stored Hadoop configuration 
is set to null.
   
   I also updated the no-Hadoop classloader test to use the existing 
CatalogContext.create(options, preferIOLoader, fallbackIOLoader) path and 
verify the Hadoop configuration is null while catalog creation still works.
   
   Local checks passed:
   - mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false 
-Dtest=CatalogFactoryTest test
   - mvn -pl paimon-core spotless:check
   
   GitHub Actions are running on the updated commit now.



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

Reply via email to