Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ org.objenesis:objenesis:2.6
org.xerial.snappy:snappy-java:1.1.10.1
org.yaml:snakeyaml:2.0
org.wildfly.openssl:wildfly-openssl:1.1.3.Final
software.amazon.awssdk:bundle:jar:2.19.12
software.amazon.awssdk.crt:aws-crt:0.21.0
software.amazon.awssdk:bundle:jar:2.20.128


--------------------------------------------------------------------------------
Expand Down
12 changes: 3 additions & 9 deletions hadoop-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@
<surefire.fork.timeout>900</surefire.fork.timeout>
<aws-java-sdk.version>1.12.367</aws-java-sdk.version>
<hsqldb.version>2.7.1</hsqldb.version>
<aws-java-sdk-v2.version>2.19.12</aws-java-sdk-v2.version>
<aws.evenstream.version>1.0.1</aws.evenstream.version>
<awscrt.version>0.21.0</awscrt.version>
<aws-java-sdk-v2.version>2.20.128</aws-java-sdk-v2.version>
<aws.eventstream.version>1.0.1</aws.eventstream.version>
<frontend-maven-plugin.version>1.11.2</frontend-maven-plugin.version>
<jasmine-maven-plugin.version>2.1</jasmine-maven-plugin.version>
<phantomjs-maven-plugin.version>0.7</phantomjs-maven-plugin.version>
Expand Down Expand Up @@ -1154,12 +1153,7 @@
<dependency>
<groupId>software.amazon.eventstream</groupId>
<artifactId>eventstream</artifactId>
<version>${aws.evenstream.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>${awscrt.version}</version>
<version>${aws.eventstream.version}</version>
</dependency>
<dependency>
<groupId>org.apache.mina</groupId>
Expand Down
4 changes: 0 additions & 4 deletions hadoop-tools/hadoop-aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,6 @@
<artifactId>bundle</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.eventstream</groupId>
<artifactId>eventstream</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import software.amazon.awssdk.services.s3.S3BaseClientBuilder;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.S3Configuration;
import software.amazon.awssdk.services.s3.multipart.MultipartConfiguration;
import software.amazon.awssdk.transfer.s3.S3TransferManager;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -98,17 +99,25 @@ public S3AsyncClient createS3AsyncClient(

Configuration conf = getConf();
String bucket = uri.getHost();

NettyNioAsyncHttpClient.Builder httpClientBuilder = AWSClientConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

is this going to build properly with unshaded artifacts? we've caused problems in the path (#2599) because of refs to .shaded classes.. the netty and client stuff are public/stable unshaded classes, correct?

.createAsyncHttpClientBuilder(conf)
.proxyConfiguration(AWSClientConfig.createAsyncProxyConfiguration(conf, bucket));

MultipartConfiguration multipartConfiguration = MultipartConfiguration.builder()
.minimumPartSizeInBytes(parameters.getMinimumPartSize())
.thresholdInBytes(parameters.getMultiPartThreshold())
.build();

return configureClientBuilder(S3AsyncClient.builder(), parameters, conf, bucket)
.httpClientBuilder(httpClientBuilder)
.multipartConfiguration(multipartConfiguration)
.multipartEnabled(true)
.build();
}

@Override
public S3TransferManager createS3TransferManager(final S3AsyncClient s3AsyncClient) {

return S3TransferManager.builder()
.s3Client(s3AsyncClient)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ private void bindAWSClient(URI name, boolean dtEnabled) throws IOException {
.withRequesterPays(conf.getBoolean(ALLOW_REQUESTER_PAYS, DEFAULT_ALLOW_REQUESTER_PAYS))
.withExecutionInterceptors(auditManager.createExecutionInterceptors())
.withMinimumPartSize(partSize)
.withMultipartThreshold(multiPartThreshold)
.withTransferManagerExecutor(unboundedThreadPool)
.withRegion(region);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ final class S3ClientCreationParameters {
*/
private long minimumPartSize;

/**
* Threshold for multipart operations.
*/
private long multiPartThreshold;

/**
* Executor that the transfer manager will use to execute background tasks.
*/
Expand Down Expand Up @@ -337,6 +342,25 @@ public S3ClientCreationParameters withMinimumPartSize(
return this;
}

/**
* Get the threshold for multipart operations.
* @return multipart threshold
*/
public long getMultiPartThreshold() {
return multiPartThreshold;
}

/**
* Set the threshold for multipart operations.
* @param value new value
* @return the builder
*/
public S3ClientCreationParameters withMultipartThreshold(
final long value) {
multiPartThreshold = value;
return this;
}

/**
* Get the executor that the transfer manager will use to execute background tasks.
* @return part size
Expand Down