singhpk234 commented on code in PR #13716:
URL: https://github.com/apache/iceberg/pull/13716#discussion_r2252244795


##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -992,6 +992,38 @@ private FileIO newFileIO(
     }
   }
 
+  private FileIO tableFileIO(
+      SessionContext context,
+      TableIdentifier identifier,
+      Map<String, String> config,
+      List<Credential> storageCredentials) {
+    // Check if either credential refresh is enabled from either client side 
or server side.
+    // TODO: convert this to constants.
+    boolean s3RefreshEnabled =
+        PropertyUtil.propertyAsBoolean(config, 
"client.refresh-credentials-enabled", false)
+            || PropertyUtil.propertyAsBoolean(
+                properties(), "client.refresh-credentials-enabled", false);
+    boolean adlsRefreshEnabled =
+        PropertyUtil.propertyAsBoolean(config, 
"adls.refresh-credentials-enabled", false)
+            || PropertyUtil.propertyAsBoolean(
+                properties(), "adls.refresh-credentials-enabled", false);
+
+    // Inject the credentials refresh endpoint if, refresh is configured.
+    // This is done because the server would not know the complete URI of the 
refresh endpoint.

Review Comment:
   My understanding was incorrect here the uri is indeed relative the path 
construction happens 
   
https://github.com/apache/iceberg/commit/9e895cb6dff9dcd2a117a4f5e197f0235047ff54#diff-61702348e74dbbc58dca09591f0d015fe9e6f44d10cf7e2e88dba2b368d3b590R138
   
   actually its relative to catalog uri - 
https://github.com/apache/iceberg/blame/main/aws/src/main/java/org/apache/iceberg/aws/s3/VendedCredentialsProvider.java#L92
   
   This would not require server knowing the uri at all which was the base of 
the problem barring the client side override doesn't work for more than 1 
table. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to