You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "ryukobayashi (via GitHub)" <gi...@apache.org> on 2025/11/05 07:40:12 UTC
[PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
ryukobayashi opened a new pull request, #6167:
URL: https://github.com/apache/hive/pull/6167
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
Migrate from the AWS SDK for Java v1 to v2
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
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?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
No
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
I just ran the existing tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3587002087
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3776247101
@deniskuzZ I also ran TPC-DS and confirmed it was slow, but I found that it was resolved by merging from master to the latest version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "okumin (via GitHub)" <gi...@apache.org>.
okumin commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2753268076
##########
standalone-metastore/pom.xml:
##########
@@ -101,7 +101,7 @@
<protobuf.version>3.25.5</protobuf.version>
<protoc-jar-maven-plugin.version>3.11.4</protoc-jar-maven-plugin.version>
<protoc.path>${env.PROTOC_PATH}</protoc.path>
- <io.grpc.version>1.72.0</io.grpc.version>
+ <io.grpc.version>1.76.0</io.grpc.version>
Review Comment:
I have a couple of requests. First, I'd like to know the reason why this needs to be changed. Second, if not needed, we prefer a separate pull request so we can easily merge/revert a change. Third, we'd like to use 1.76.3 or 1.78.0.
##########
ql/src/java/org/apache/hadoop/hive/ql/secrets/AWSSecretsManagerSecretSource.java:
##########
@@ -17,27 +17,35 @@
*/
package org.apache.hadoop.hive.ql.secrets;
-import com.amazonaws.secretsmanager.caching.SecretCache;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;
import java.io.IOException;
import java.net.URI;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
/**
* Implementation of SecretSource which loads secrets from AWS Secrets Manager.
* The format of the uri is "aws-sm:///{key-name-or-arn}"
- * It uses aws secrets cache sdk to fetch and refresh the secret, the environment must be setup so that the default
+ * It uses AWS SDK v2 with Guava cache to fetch and refresh the secret, the environment must be setup so that the default
* client can load the secret else it will fail.
* It expects the secret fetched to be a json string with "password" as the key for password, this is default for
* redshift, rds or external database configs. It does not make use of any other fields.
*/
public class AWSSecretsManagerSecretSource implements SecretSource {
- // 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;
Review Comment:
I guess 2.x depends on SDK v2.
https://mvnrepository.com/artifact/com.amazonaws.secretsmanager/aws-secretsmanager-caching-java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3754731863
> @deniskuzZ Ok, I'd like to add performance tests. What would be the appropriate approach? Could you also share details about the performance issues you mentioned with the previous hadoop-aws upgrade
hi @, sorry for the delay
We ran the TPC-DS benchmark and observed that a few queries experienced performance degradation after switching Hadoop AWS to v2.
We traced this issue to [HADOOP-19205](https://issues.apache.org/jira/browse/HADOOP-19205), though other factors could also be contributing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3841433867
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2757667166
##########
ql/src/java/org/apache/hadoop/hive/ql/secrets/AWSSecretsManagerSecretSource.java:
##########
@@ -17,27 +17,35 @@
*/
package org.apache.hadoop.hive.ql.secrets;
-import com.amazonaws.secretsmanager.caching.SecretCache;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;
import java.io.IOException;
import java.net.URI;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
/**
* Implementation of SecretSource which loads secrets from AWS Secrets Manager.
* The format of the uri is "aws-sm:///{key-name-or-arn}"
- * It uses aws secrets cache sdk to fetch and refresh the secret, the environment must be setup so that the default
+ * It uses AWS SDK v2 with Guava cache to fetch and refresh the secret, the environment must be setup so that the default
* client can load the secret else it will fail.
* It expects the secret fetched to be a json string with "password" as the key for password, this is default for
* redshift, rds or external database configs. It does not make use of any other fields.
*/
public class AWSSecretsManagerSecretSource implements SecretSource {
- // 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;
Review Comment:
You're right. Using that version required no code modifications. I will fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3599942236
@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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3509612463
@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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2757660486
##########
standalone-metastore/pom.xml:
##########
@@ -101,7 +101,7 @@
<protobuf.version>3.25.5</protobuf.version>
<protoc-jar-maven-plugin.version>3.11.4</protoc-jar-maven-plugin.version>
<protoc.path>${env.PROTOC_PATH}</protoc.path>
- <io.grpc.version>1.72.0</io.grpc.version>
+ <io.grpc.version>1.76.0</io.grpc.version>
Review Comment:
Previously, this would cause a compilation error, but it appears to be no longer necessary after merging master. I will revert it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3860881091
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3491262120
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3588507622
@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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "okumin (via GitHub)" <gi...@apache.org>.
okumin commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2766714227
##########
ql/pom.xml:
##########
@@ -167,15 +167,14 @@
<artifactId>hive-storage-api</artifactId>
</dependency>
<!-- inter-project -->
- <dependency>
- <groupId>com.amazonaws</groupId>
- <artifactId>aws-java-sdk-bundle</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>com.amazonaws.secretsmanager</groupId>
<artifactId>aws-secretsmanager-caching-java</artifactId>
</dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>secretsmanager</artifactId>
+ </dependency>
Review Comment:
Can we remove this one at all because [aws-secretmanager-caching-java](https://mvnrepository.com/artifact/com.amazonaws.secretsmanager/aws-secretsmanager-caching-java/2.1.1/dependencies) includes `secretsmanager`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "okumin (via GitHub)" <gi...@apache.org>.
okumin commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3869049446
@ryukobayashi Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3630060162
@deniskuzZ Ok, I'd like to add performance tests. What would be the appropriate approach? Could you also share details about the performance issues you mentioned with the previous hadoop-aws upgrade
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3860169065
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "okumin (via GitHub)" <gi...@apache.org>.
okumin merged PR #6167:
URL: https://github.com/apache/hive/pull/6167
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2493371459
##########
ql/src/java/org/apache/hadoop/hive/ql/secrets/AWSSecretsManagerSecretSource.java:
##########
@@ -17,27 +17,35 @@
*/
package org.apache.hadoop.hive.ql.secrets;
-import com.amazonaws.secretsmanager.caching.SecretCache;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueRequest;
+import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;
import java.io.IOException;
import java.net.URI;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
/**
* Implementation of SecretSource which loads secrets from AWS Secrets Manager.
* The format of the uri is "aws-sm:///{key-name-or-arn}"
- * It uses aws secrets cache sdk to fetch and refresh the secret, the environment must be setup so that the default
+ * It uses AWS SDK v2 with Guava cache to fetch and refresh the secret, the environment must be setup so that the default
* client can load the secret else it will fail.
* It expects the secret fetched to be a json string with "password" as the key for password, this is default for
* redshift, rds or external database configs. It does not make use of any other fields.
*/
public class AWSSecretsManagerSecretSource implements SecretSource {
- // 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;
Review Comment:
`aws-secretsmanager-caching-java` does not exist in v2. So we need to implement our own cache or use the v1 version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3501008836
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3501563287
was the hadoop migrated to aws sdk v2 as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3776439284
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6167&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6167&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6167&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6167)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "ryukobayashi (via GitHub)" <gi...@apache.org>.
ryukobayashi commented on code in PR #6167:
URL: https://github.com/apache/hive/pull/6167#discussion_r2772666079
##########
ql/pom.xml:
##########
@@ -167,15 +167,14 @@
<artifactId>hive-storage-api</artifactId>
</dependency>
<!-- inter-project -->
- <dependency>
- <groupId>com.amazonaws</groupId>
- <artifactId>aws-java-sdk-bundle</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>com.amazonaws.secretsmanager</groupId>
<artifactId>aws-secretsmanager-caching-java</artifactId>
</dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>secretsmanager</artifactId>
+ </dependency>
Review Comment:
Yes, I checked, and that is correct. I also found that the following was unnecessary, so I removed it.
```
<aws-java-sdk.version>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3588909966
> @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: https://github.com/apache/hive/pull/6215, but indeed `aws-secretsmanager-caching-java`was present in Hive lib dir.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29305: Migrate from the AWS SDK for Java v1 to v2 [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6167:
URL: https://github.com/apache/hive/pull/6167#issuecomment-3621914681
> @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`.
ok. we'll probably need perf testing here. I recall we had significant perf degradation last time we upgraded hadoop-aws dependency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org