HADOOP-19282. S3A: STSClientFactory: do not use URIBuilder [branch 3.4] #8008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
URIBuilderwas used from the AWS SDK for Java v2, to be precise from the shaded Apache HTTP Client. It is a problem if a user would like not to use the AWS SDK bundle, since more or less only 3 modules are needed (s3, s3-transfer & sts), but that may cause problems on unshaded dependency versions. Since a URI constructor can achieve the same here I switched it as a preferred option.How was this patch tested?
I've run the test suite against a eu-west-1 bucket, without scaling/load since the change shouldn't affect that. To be exact, with something like this:
auth-keys.xmlAlmost all test pass:
ITestBucketTooldidn't pass as I haven't granted permissions for any form ofs3:CreateBucket.ITestDelegatedMRJob,ITestS3AMiniYarnClusterandITestS3ACommitterMRJobfailed because of java modules (I think this test is out of the scope for this change) or failing to start history server.ITestS3ACommitterFactory,ITestPartitionedCommitProtocol,ITestMagicCommitProtocolandITestStagingCommitProtocolfailed for attempting to parseb-00as random job ID.ITestS3AContractMkdirWithCreatePerfandITestS3AContractAnalyticsStreamVectoredRead.All tests related to session credentials did pass though. Again, this was tested in trunk before and worked.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?Sign-off
I give a license to the Apache Software Foundation to use this code, as required under §5 of the Apache License.