Skip to content

Conversation

@ryukobayashi
Copy link
Contributor

What changes were proposed in this pull request?

Migrate from the AWS SDK for Java v1 to v2

Why are the changes needed?

AWS SDK for Java v1.x will reach EOL on December 31, 2025: https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-java-v1-x-on-december-31-2025/

Does this PR introduce any user-facing change?

No

How was this patch tested?

I just ran the existing tests.

// Do not create SecretCache here, it fails to initialize in non-aws aware environments.
private volatile SecretCache cache = null;
// Do not create cache here, it fails to initialize in non-aws aware environments.
private volatile LoadingCache<String, String> cache = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

aws-secretsmanager-caching-java does not exist in v2. So we need to implement our own cache or use the v1 version.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

@deniskuzZ
Copy link
Member

was the hadoop migrated to aws sdk v2 as well?

@ryukobayashi
Copy link
Contributor Author

@deniskuzZ Yes, as far as I see the documentation and tickets, the migration has been completed.
https://apache.github.io/hadoop/hadoop-aws/tools/hadoop-aws/aws_sdk_upgrade.html
https://issues.apache.org/jira/browse/HADOOP-18073

@deniskuzZ
Copy link
Member

deniskuzZ commented Nov 27, 2025

i used https://repo1.maven.org/maven2/software/amazon/awssdk/bundle/2.26.19/bundle-2.26.19.jar with Hive-4.2 and it works without any code changes.

@ryukobayashi
Copy link
Contributor Author

@deniskuzZ How did you verify this? Isn't that because it's using aws-secretsmanager-caching-java? aws-secretsmanager-caching-java depends on v1 because it uses AWSSecretsManagerClientBuilder.

@deniskuzZ
Copy link
Member

deniskuzZ commented Nov 28, 2025

@deniskuzZ How did you verify this? Isn't that because it's using aws-secretsmanager-caching-java? aws-secretsmanager-caching-java depends on v1 because it uses AWSSecretsManagerClientBuilder.

was using docker with s3 setup: #6215, but indeed aws-secretsmanager-caching-java-1.0.1.jarwas present in Hive lib dir.

@ryukobayashi
Copy link
Contributor Author

@deniskuzZ If so, it's working with v1. If we can use com.amazonaws without changing code, it means that it is working with v1, and we need to change it to software.amazon.awssdk.

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