Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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": "documentation",
Comment thread
adev-code marked this conversation as resolved.
Resolved
"category": "AWS CRT-based S3 Client",
"description": "Clarified in the Javadoc that minimumPartSizeInBytes applies to downloads as well as uploads, and updated the default part size and initial read buffer size descriptions. See [#5158](https://github.com/aws/aws-sdk-java-v2/issues/5158).",
"contributor": "adev-code"
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,21 @@ default S3CrtAsyncClientBuilder credentialsProvider(IdentityProvider<? extends A
S3CrtAsyncClientBuilder region(Region region);

/**
* Sets the minimum part size for transfer parts. Decreasing the minimum part size causes multipart transfer to be split into
* a larger number of smaller parts. Setting this value too low has a negative effect on transfer speeds, causing extra
* latency and network communication for each part.
* Sets the minimum part size for transfer parts. This applies to both uploads and downloads: uploads are sent as multipart
Comment thread
adev-code marked this conversation as resolved.
Resolved
* upload parts of this size, and downloads are fetched in parts of this size using ranged GET requests. Decreasing the
* minimum part size causes a transfer to be split into a larger number of smaller parts. Setting this value too low has a
* negative effect on transfer speeds, causing extra latency and network communication for each part.
*
* <p>
* By default, it is 8MB. See <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html">Amazon S3 multipart
* upload limits</a> for guidance.
* If not set, uploads use a part size of 8MB, and downloads use a part size that the AWS CRT chooses based on the
* {@link #maxNativeMemoryLimitInBytes(Long)} and {@link #targetThroughputInGbps(Double)} settings. See
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html">Amazon S3 multipart upload limits</a> for
* guidance on upload part sizes.
*
* @param uploadPartSize The minimum part size for transfer parts.
* @param partSizeInBytes The minimum part size for transfer parts.
* @return this builder for method chaining.
*/
S3CrtAsyncClientBuilder minimumPartSizeInBytes(Long uploadPartSize);
S3CrtAsyncClientBuilder minimumPartSizeInBytes(Long partSizeInBytes);

/**
* The amount of native memory that CRT is allowed to use when making requests to S3.
Expand Down Expand Up @@ -223,7 +226,7 @@ S3CrtAsyncClientBuilder maxNativeMemoryLimitInBytes(Long maxNativeMemoryLimitInB
* parts. Maintain a smaller window to limit the amount of data buffered in memory.
*
* <p>
* By default, it is equal to the resolved part size * 10
* By default, it is 10 times the {@link #minimumPartSizeInBytes(Long)} value, or 80MB if no part size is set.
*
* @param initialReadBufferSizeInBytes the initial read buffer size
* @return this builder for method chaining.
Expand Down
Loading