Skip to content

[CELEBORN-2259] The S3MultipartUploadHandler uses fs.s3a.aws.credentials.provider#3599

Open
Dzeri96 wants to merge 1 commit intoapache:mainfrom
Dzeri96:CELEBORN-2259-cherrypicked
Open

[CELEBORN-2259] The S3MultipartUploadHandler uses fs.s3a.aws.credentials.provider#3599
Dzeri96 wants to merge 1 commit intoapache:mainfrom
Dzeri96:CELEBORN-2259-cherrypicked

Conversation

@Dzeri96
Copy link

@Dzeri96 Dzeri96 commented Feb 10, 2026

What changes were proposed in this pull request?

The S3 Client in S3MultipartUploadHandler now uses the dynamic config fs.s3a.aws.credentials.provider in order to set its provider chain up.

Why are the changes needed?

Before this, it was only possible to use the hard-coded provider configuration.

Does this PR resolve a correctness bug?

Sort of.

Does this PR introduce any user-facing change?

Yes, in the sense that celeborn.hadoop.fs.s3a.aws.credentials.provider will now work correctly in the MultiPartHandler.

How was this patch tested?

Unit tests and a manual test.
Note: I don't like having to change the class in order to make it testable, but I'm planning to get rid of this whole logic in another PR, where we will use the same hadoop-created S3 client everywhere.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eolivelli
Copy link
Contributor

@xy2953396112 @FMX @SteNicholas can you please take a look ?


static AWSCredentialProviderList getCredentialsProvider(URI binding, Configuration conf)
throws IOException {
return S3AUtils.createAWSCredentialProviderSet(binding, conf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the API is deleted in HADOOP-18073. S3A: Upgrade AWS SDK to V2

@pan3793
Copy link
Member

pan3793 commented Feb 12, 2026

change makes sense, the only concern is that the API is removed in Hadoop 3.4.0

@eolivelli
Copy link
Contributor

Upgrading AWS SDK to V2 is a much bigger change, I think it is better to do it as a separate step, and I guess it will have some other impact.

The current solution does not require to copy/paste code from Hadoop codebase, as as the dependency is in the pom, when we upgrade the SDK we will also upgrade this code

what do you think @pan3793 ?

@pan3793
Copy link
Member

pan3793 commented Feb 12, 2026

The current solution does not require to copy/paste code from Hadoop codebase, as as the dependency is in the pom, when we upgrade the SDK we will also upgrade this code

I'm fine with that, but please at least leave some comments there.

BTW, Hadoop 3.4.3 (under RC phase) will be the first version that works with JDK 25, it's likely that Celebron will upgrade it soon.

ExclusionRule("com.amazonaws", "aws-java-sdk-bundle"))
val awsS3 = "com.amazonaws" % "aws-java-sdk-s3" % awsS3Version
// Needed for com.amazonaws.auth.WebIdentityTokenCredentialsProvider
val awsSTS = "com.amazonaws" % "aws-java-sdk-sts" % awsS3Version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new dep to the binary release tarball? don't forget to update LICENSE-binary/NOTICE-binary

AWSCredentialProviderList providers =
S3MultipartUploadHandler.getCredentialsProvider(null, conf);
Assert.assertTrue(providers.size() != 0);
System.out.println(providers.listProviderNames());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertion instead of println

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I guess the default value matches the existing behavior, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants