Skip to content

Commit 77e551a

Browse files
authored
HADOOP-18481. AWS v2 SDK upgrade log to not about standard AWS Credential Providers. (#4973)
The AWS SDKV2 upgrade log no longer warns about instantiation of the v1 SDK credential providers which are commonly used in s3a configurations: * com.amazonaws.auth.EnvironmentVariableCredentialsProvider * com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper * com.amazonaws.auth.InstanceProfileCredentialsProvider When the hadoop-aws module moves to the v2 SDK, references to these credential providers will be rewritten to their v2 equivalents. Follow-on to HADOOP-18382. "Upgrade AWS SDK to V2 - Prerequisites" Contributed by Ahmar Suhail
1 parent 5b52123 commit 77e551a

File tree

1 file changed

+4
-1
lines changed
  • hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a

1 file changed

+4
-1
lines changed

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,10 @@ public static AWSCredentialProviderList buildAWSProviderList(
640640
AWSCredentialProviderList providers = new AWSCredentialProviderList();
641641
for (Class<?> aClass : awsClasses) {
642642

643-
if (aClass.getName().contains(AWS_AUTH_CLASS_PREFIX)) {
643+
// List of V1 credential providers that will be migrated with V2 upgrade
644+
if (!Arrays.asList("EnvironmentVariableCredentialsProvider",
645+
"EC2ContainerCredentialsProviderWrapper", "InstanceProfileCredentialsProvider")
646+
.contains(aClass.getSimpleName()) && aClass.getName().contains(AWS_AUTH_CLASS_PREFIX)) {
644647
V2Migration.v1ProviderReferenced(aClass.getName());
645648
}
646649

0 commit comments

Comments
 (0)