munendrasn opened a new pull request, #10872: URL: https://github.com/apache/iceberg/pull/10872
When `ResolvingFileIo` is invoked without conf set (which can happen when catalog or fileIo is explicitly created), it throws NPE. ``` java.lang.NullPointerException at org.apache.iceberg.io.ResolvingFileIO.lambda$io$1(ResolvingFileIO.java:179) at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705) at org.apache.iceberg.io.ResolvingFileIO.io(ResolvingFileIO.java:176) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMethods.java:62) at org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:74) at org.apache.iceberg.common.DynMethods$BoundMethod.invoke(DynMethods.java:171) ``` The workaround is set to `Configuration` always. For example, while creating the RESTCatalog like below but the order need to be maintained ```java RESTCatalog catalog = new RESTCatalog(); catalog.setConf(new Configuration()); catalog.initialize("rest", Map.of()); ``` Exception HadoopFileIO, conf is not required or unused for other FileIo impl hence, handling with soft check, other option was to have strict check and fail if it is not set [here](https://github.com/apache/iceberg/blob/b17d1c9abdb8fbd668ac02194cadd6003c3e37f7/core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java#L177) -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org