This is an automated email from the ASF dual-hosted git repository.

mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 714fffa33ebb5fb60fe37b12ad6b17d79b99502c
Author: Hussain Towaileb <[email protected]>
AuthorDate: Tue Mar 4 13:57:44 2025 +0300

    [NO ISSUE][EXT]: Correctly pass session token property for hadoop
    
    Ext-ref: MB-65588
    Change-Id: Idee6fb65900b50417f26be88975ef3b186728789
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19488
    Integration-Tests: Jenkins <[email protected]>
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Peeyush Gupta <[email protected]>
---
 .../main/java/org/apache/asterix/external/util/aws/s3/S3AuthUtils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/aws/s3/S3AuthUtils.java
 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/aws/s3/S3AuthUtils.java
index 4e0a4354bc..f6ca480dcb 100644
--- 
a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/aws/s3/S3AuthUtils.java
+++ 
b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/aws/s3/S3AuthUtils.java
@@ -51,6 +51,7 @@ import static 
org.apache.asterix.external.util.aws.s3.S3Constants.HADOOP_SECRET_
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.HADOOP_SERVICE_END_POINT;
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.HADOOP_SESSION_TOKEN;
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.HADOOP_SIMPLE;
+import static 
org.apache.asterix.external.util.aws.s3.S3Constants.HADOOP_TEMPORARY;
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.INSTANCE_PROFILE_FIELD_NAME;
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.REGION_FIELD_NAME;
 import static 
org.apache.asterix.external.util.aws.s3.S3Constants.ROLE_ARN_FIELD_NAME;
@@ -452,7 +453,7 @@ public class S3AuthUtils {
                 jobConf.set(HADOOP_ACCESS_KEY_ID, 
configuration.get(ACCESS_KEY_ID_FIELD_NAME));
                 jobConf.set(HADOOP_SECRET_ACCESS_KEY, 
configuration.get(SECRET_ACCESS_KEY_FIELD_NAME));
                 if (configuration.get(SESSION_TOKEN_FIELD_NAME) != null) {
-                    jobConf.set(HADOOP_CREDENTIAL_PROVIDER_KEY, 
HADOOP_SESSION_TOKEN);
+                    jobConf.set(HADOOP_CREDENTIAL_PROVIDER_KEY, 
HADOOP_TEMPORARY);
                     jobConf.set(HADOOP_SESSION_TOKEN, 
configuration.get(SESSION_TOKEN_FIELD_NAME));
                 }
                 break;

Reply via email to