-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-18708: Support S3 Client Side Encryption(CSE) With AWS SDK V2 #6884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
882897c
1deb43a
b196965
59a7e05
2f2790f
d4397bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ | |
| import software.amazon.awssdk.regions.Region; | ||
| import software.amazon.awssdk.s3accessgrants.plugin.S3AccessGrantsPlugin; | ||
| import software.amazon.awssdk.services.s3.S3AsyncClient; | ||
| import software.amazon.awssdk.services.s3.S3AsyncClientBuilder; | ||
| import software.amazon.awssdk.services.s3.S3BaseClientBuilder; | ||
| import software.amazon.awssdk.services.s3.S3Client; | ||
| import software.amazon.awssdk.services.s3.S3Configuration; | ||
|
|
@@ -160,11 +161,17 @@ public S3AsyncClient createS3AsyncClient( | |
| .thresholdInBytes(parameters.getMultiPartThreshold()) | ||
| .build(); | ||
|
|
||
| return configureClientBuilder(S3AsyncClient.builder(), parameters, conf, bucket) | ||
| .httpClientBuilder(httpClientBuilder) | ||
| .multipartConfiguration(multipartConfiguration) | ||
| .multipartEnabled(parameters.isMultipartCopy()) | ||
| .build(); | ||
| S3AsyncClientBuilder s3AsyncClientBuilder = | ||
| configureClientBuilder(S3AsyncClient.builder(), parameters, conf, bucket) | ||
| .httpClientBuilder(httpClientBuilder); | ||
|
|
||
| // TODO: Enable multi part upload with cse once it is available. | ||
|
||
| if (!parameters.isClientSideEncryptionEnabled()) { | ||
steveloughran marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| s3AsyncClientBuilder.multipartConfiguration(multipartConfiguration) | ||
| .multipartEnabled(parameters.isMultipartCopy()); | ||
| } | ||
|
|
||
| return s3AsyncClientBuilder.build(); | ||
| } | ||
|
|
||
| @Override | ||
|
|
@@ -373,7 +380,7 @@ private <BuilderT extends S3BaseClientBuilder<BuilderT, ClientT>, ClientT> void | |
| * @param conf config to build the URI from. | ||
| * @return an endpoint uri | ||
| */ | ||
| private static URI getS3Endpoint(String endpoint, final Configuration conf) { | ||
| protected static URI getS3Endpoint(String endpoint, final Configuration conf) { | ||
|
|
||
| boolean secureConnections = conf.getBoolean(SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.