Skip to content

Remove TODOs and change default targetThroughputInGbps to 10 #3634

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

Merged
merged 3 commits into from
Dec 16, 2022
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "feature",
"category": "Amazon S3 Transfer Manager",
"contributor": "",
"description": "Change default `targetThroughputInGbps` from 5 to 10"
}
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ protected AttributeMap childHttpConfig() {
* Finalize which async executor service will be used for the created client. The default async executor
* service has at least 8 core threads and can scale up to at least 64 threads when needed depending
* on the number of processors available.
*
* This uses the same default executor in S3NativeClientConfiguration#resolveAsyncFutureCompletionExecutor.
* Make sure you update that method if you update the defaults here.
*/
private Executor resolveAsyncFutureCompletionExecutor(SdkClientConfiguration config) {
Supplier<Executor> defaultExecutor = () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,8 @@ interface Builder {
* {@link S3AsyncClient} if not provided.
*
* <p>
* It's highly recommended using {@link S3AsyncClient#crtBuilder()} to create an {@link S3AsyncClient} instance to benefit
* from multipart upload/download feature and maximum throughput.
* It's highly recommended to use {@link S3AsyncClient#crtBuilder()} to create an {@link S3AsyncClient} instance to
* benefit from multipart upload/download feature and maximum throughput.
*
* <p>
* Note: the provided {@link S3AsyncClient} will not be closed when the transfer manager is closed; it must be closed by
Expand All @@ -709,11 +709,10 @@ interface Builder {
/**
* Specifies the executor that {@link S3TransferManager} will use to execute background tasks before handing them off to
* the underlying S3 async client, such as visiting file tree in a
* {@link S3TransferManager#uploadDirectory(UploadDirectoryRequest)}
* operation
* {@link S3TransferManager#uploadDirectory(UploadDirectoryRequest)} operation.
*
* <p>
* The SDK will create an executor if not provided
* The SDK will create an executor if not provided.
*
* <p>
* <b>This executor must be shut down by the user when it is ready to be disposed. The SDK will not close the executor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ public final class TransferConfigurationOption<T> extends AttributeMap.Key<T> {

private static final int DEFAULT_UPLOAD_DIRECTORY_MAX_DEPTH = Integer.MAX_VALUE;

private static final Boolean DEFAULT_UPLOAD_DIRECTORY_FOLLOW_SYMBOLIC_LINKS = Boolean.FALSE;

// TODO: revisit default settings before GA
public static final AttributeMap TRANSFER_MANAGER_DEFAULTS = AttributeMap
.builder()
.put(UPLOAD_DIRECTORY_MAX_DEPTH, DEFAULT_UPLOAD_DIRECTORY_MAX_DEPTH)
.put(UPLOAD_DIRECTORY_FOLLOW_SYMBOLIC_LINKS, DEFAULT_UPLOAD_DIRECTORY_FOLLOW_SYMBOLIC_LINKS)
.put(UPLOAD_DIRECTORY_FOLLOW_SYMBOLIC_LINKS, false)
.build();

private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public void close() {
options.close();
}

// TODO: revisit this before GA
private Executor defaultExecutor() {
int maxPoolSize = 100;
ThreadPoolExecutor executor = new ThreadPoolExecutor(0, maxPoolSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public interface S3CrtAsyncClientBuilder extends SdkBuilder<S3CrtAsyncClientBuil
* on various factors such as the network bandwidth of the environment and the configured {@link #maxConcurrency}.
*
* <p>
* By default, it is 5Gbps
* By default, it is 10 Gbps
*
* @param targetThroughputInGbps the target throughput in Gbps
* @return this builder for method chaining.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.core.client.config.ClientAsyncConfiguration;
import software.amazon.awssdk.crt.auth.credentials.CredentialsProvider;
import software.amazon.awssdk.crt.io.ClientBootstrap;
import software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain;
Expand All @@ -31,7 +30,7 @@
@SdkInternalApi
public class S3NativeClientConfiguration implements SdkAutoCloseable {
private static final long DEFAULT_PART_SIZE_IN_BYTES = 8L * 1024 * 1024;
private static final long DEFAULT_TARGET_THROUGHPUT_IN_GBPS = 5;
private static final long DEFAULT_TARGET_THROUGHPUT_IN_GBPS = 10;

private final String signingRegion;
private final ClientBootstrap clientBootstrap;
Expand Down Expand Up @@ -118,14 +117,13 @@ public void close() {
}

public static final class Builder {
public Long readBufferSizeInBytes;
private Long readBufferSizeInBytes;
private String signingRegion;
private AwsCredentialsProvider credentialsProvider;
private Long partSizeInBytes;
private Double targetThroughputInGbps;
private Integer maxConcurrency;
private URI endpointOverride;
private ClientAsyncConfiguration asynConfiguration;
private Boolean checksumValidationEnabled;

private Builder() {
Expand Down