dimas-b commented on code in PR #724:
URL: https://github.com/apache/polaris/pull/724#discussion_r1924517072


##########
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java:
##########
@@ -19,18 +19,157 @@
 package org.apache.polaris.service.catalog.io;
 
 import io.smallrye.common.annotation.Identifier;
+import jakarta.annotation.Nonnull;
 import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
 import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.catalog.TableIdentifier;
 import org.apache.iceberg.io.FileIO;
+import org.apache.polaris.core.PolarisConfiguration;
+import org.apache.polaris.core.PolarisConfigurationStore;
+import org.apache.polaris.core.context.RealmContext;
+import org.apache.polaris.core.entity.PolarisEntity;
+import org.apache.polaris.core.entity.PolarisEntityConstants;
+import org.apache.polaris.core.persistence.PolarisEntityManager;
+import org.apache.polaris.core.persistence.PolarisMetaStoreManager;
+import org.apache.polaris.core.persistence.PolarisMetaStoreSession;
+import org.apache.polaris.core.persistence.PolarisResolvedPathWrapper;
+import org.apache.polaris.core.storage.PolarisCredentialVendor;
+import org.apache.polaris.core.storage.PolarisStorageActions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** A simple FileIOFactory implementation that defers all the work to the 
Iceberg SDK */
 @ApplicationScoped
 @Identifier("default")
 public class DefaultFileIOFactory implements FileIOFactory {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(DefaultFileIOFactory.class);
+
+  private final RealmContext realmContext;
+  private final PolarisEntityManager entityManager;
+  private final PolarisMetaStoreManager metaStoreManager;

Review Comment:
   Should this be `PolarisCredentialVendor`? It seems to be the narrowest 
interface in use on this object in this class.



##########
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -1592,21 +1592,38 @@ private FileIO refreshIOWithCredentials(
       PolarisResolvedPathWrapper resolvedStorageEntity,
       Map<String, String> tableProperties,
       Set<PolarisStorageActions> storageActions) {
-    Optional<PolarisEntity> storageInfoEntity = 
findStorageInfoFromHierarchy(resolvedStorageEntity);
-    Map<String, String> credentialsMap =
-        storageInfoEntity
-            .map(
-                storageInfo ->
-                    refreshCredentials(identifier, storageActions, 
readLocations, storageInfo))
-            .orElse(Map.of());
+    //    Optional<PolarisEntity> storageInfoEntity =
+    // findStorageInfoFromHierarchy(resolvedStorageEntity);
+    //    Map<String, String> credentialsMap =
+    //        storageInfoEntity
+    //            .map(
+    //                storageInfo ->
+    //                    refreshCredentials(identifier, storageActions, 
readLocations,

Review Comment:
   Why keep this code commented out?



##########
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java:
##########
@@ -19,9 +19,21 @@
 package org.apache.polaris.service.catalog.io;
 
 import java.util.Map;
+import java.util.Set;
+import org.apache.iceberg.catalog.TableIdentifier;
 import org.apache.iceberg.io.FileIO;
+import org.apache.polaris.core.persistence.PolarisResolvedPathWrapper;
+import org.apache.polaris.core.storage.PolarisStorageActions;
 
 /** Interface for providing a way to construct FileIO objects, such as for 
reading/writing S3. */
 public interface FileIOFactory {
   FileIO loadFileIO(String impl, Map<String, String> properties);

Review Comment:
   Is this method still needed?



##########
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java:
##########
@@ -19,9 +19,21 @@
 package org.apache.polaris.service.catalog.io;
 
 import java.util.Map;
+import java.util.Set;
+import org.apache.iceberg.catalog.TableIdentifier;
 import org.apache.iceberg.io.FileIO;
+import org.apache.polaris.core.persistence.PolarisResolvedPathWrapper;
+import org.apache.polaris.core.storage.PolarisStorageActions;
 
 /** Interface for providing a way to construct FileIO objects, such as for 
reading/writing S3. */
 public interface FileIOFactory {
   FileIO loadFileIO(String impl, Map<String, String> properties);
+
+  FileIO loadFileIO(
+      String impl,

Review Comment:
   nit: maybe `className`?



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