gaborgsomogyi commented on code in PR #27026:
URL: https://github.com/apache/flink/pull/27026#discussion_r3302685213


##########
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/token/DynamicTemporaryAWSCredentialsProvider.java:
##########
@@ -52,21 +57,45 @@ public DynamicTemporaryAWSCredentialsProvider() {}
 
     public DynamicTemporaryAWSCredentialsProvider(URI uri, Configuration conf) 
{}
 
+    /**
+     * AWS SDK V1 method - used by Presto S3 filesystem.
+     *
+     * @return AWS SDK V1 credentials
+     */
     @Override
-    public AWSCredentials getCredentials() throws SdkBaseException {
+    public AWSCredentials getCredentials() {
         Credentials credentials = 
AbstractS3DelegationTokenReceiver.getCredentials();
         if (credentials == null) {
             throw new NoAwsCredentialsException(COMPONENT);
         }
-        LOG.debug("Providing session credentials");
+        LOG.debug("Providing session credentials (SDK V1)");
         return new BasicSessionCredentials(
-                credentials.getAccessKeyId(),
-                credentials.getSecretAccessKey(),
-                credentials.getSessionToken());
+                credentials.accessKeyId(),
+                credentials.secretAccessKey(),
+                credentials.sessionToken());
     }
 
+    /** AWS SDK V1 method - refresh is a no-op as credentials are managed 
externally. */
     @Override
     public void refresh() {
-        // Intentionally blank. Credentials are updated by 
S3DelegationTokenReceiver
+        // Credentials are managed by the DelegationTokenReceiver, no-op here
+    }
+
+    /**
+     * AWS SDK V2 method - used by Hadoop 3.4.0+ S3A filesystem.
+     *
+     * @return AWS SDK V2 credentials
+     */
+    @Override
+    public software.amazon.awssdk.auth.credentials.AwsCredentials 
resolveCredentials() {

Review Comment:
   Maybe this can be imported



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