JingsongLi commented on code in PR #8193:
URL: https://github.com/apache/paimon/pull/8193#discussion_r3401912818
##########
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:
Can you just create a method and do try catch? If there is no Hadoop class,
set it directly to NULL.
--
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]