nastra commented on code in PR #12612:
URL: https://github.com/apache/iceberg/pull/12612#discussion_r2018769027


##########
aws/src/main/java/org/apache/iceberg/aws/s3/VendedCredentialsProvider.java:
##########
@@ -47,17 +49,23 @@ public class VendedCredentialsProvider implements 
AwsCredentialsProvider, SdkAut
   private volatile HTTPClient client;
   private final Map<String, String> properties;
   private final CachedSupplier<AwsCredentials> credentialCache;
+  private final String catalogEndpoint;
+  private final String credentialsEndpoint;
   private AuthManager authManager;
   private AuthSession authSession;
 
   private VendedCredentialsProvider(Map<String, String> properties) {
     Preconditions.checkArgument(null != properties, "Invalid properties: 
null");
-    Preconditions.checkArgument(null != properties.get(URI), "Invalid URI: 
null");
+    Preconditions.checkArgument(null != properties.get(URI), "Invalid 
credentials endpoint: null");
+    Preconditions.checkArgument(
+        null != properties.get(CatalogProperties.URI), "Invalid catalog 
endpoint: null");
     this.properties = properties;
     this.credentialCache =
         CachedSupplier.builder(() -> 
credentialFromProperties().orElseGet(this::refreshCredential))
             .cachedValueName(VendedCredentialsProvider.class.getName())
             .build();
+    this.catalogEndpoint = properties.get(CatalogProperties.URI);
+    this.credentialsEndpoint = RESTUtil.resolveEndpoint(catalogEndpoint, 
properties.get(URI));

Review Comment:
   this is already being done in `AwsClientProperties`, so it should only do 
`this.credentialsEndpoint = properties.get(URI)`



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

Reply via email to