flyrain commented on code in PR #1624:
URL: https://github.com/apache/polaris/pull/1624#discussion_r2098939710
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java:
##########
@@ -232,7 +222,16 @@ public String name() {
}
@VisibleForTesting
- public FileIO getIo() {
+ public synchronized FileIO getIo() {
+ if (catalogFileIO == null) {
+ LOGGER.debug(
+ "Initializing a default catalogFileIO with properties {}",
tableDefaultProperties);
+ catalogFileIO = loadFileIO(ioImplClassName, tableDefaultProperties);
Review Comment:
The class `IcebergCatalog` belongs to package
`org.apache.polaris.service.catalog.iceberg`, while `IcebergCatalogTest`
belongs to package `org.apache.polaris.service.quarkus.catalog`. Are you
suggesting a setter or a subclass? I think a subclass will make the test code
overly complicated. Another way is to introduce a setter like
`setFileIO(fileIO)`. This new method will face the same issue, which is the
method is public and used only by tests.
Please let me know which way you prefer. cc @dimas-b @snazy.
--
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]