-
Notifications
You must be signed in to change notification settings - Fork 916
S3 Async Client - Multipart download #5164
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
Changes from 34 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
7100df4
Merge from master (#4901)
L-Applin 8c18e39
Splitting transformer (#4826)
L-Applin b247de9
Enable setting multipart to true/false by defining it as a custom cli…
anirudh9391 511205c
Add config class for SplittingTransformer (#4939)
davidh44 730750e
Merge mainline into multipart feature branch (#4965)
L-Applin a98af91
Surface area review (#4971)
L-Applin dd3eb20
MultipartS3AsyncClient download benchmarks (#4948)
davidh44 336fd35
Implementation of MultipartDownloaderSubscriber (#4931)
L-Applin 7d82774
Update s3-benchmarks to support java-based multipart download. (#5003)
L-Applin 9f4563b
Use Content-Range in multipart download for totalBytes (#5101)
L-Applin 330ab9f
change NoopTransformer type-param to Object, preventing an NPE which …
L-Applin e041ca2
Fix for threads hanging with forwardTransformedResultTo (#5117)
L-Applin 4187e62
Merge branch 'master' into feature/master/s3mpu
L-Applin d5dff64
Merge branch 'master' into feature/master/s3mpu
L-Applin 97f0a5f
[draft] java-based integ test (#5129)
L-Applin 768526e
Fix merge issue and bump peak thread count in stability tests (#5174)
zoewangg 405cc74
Fix stability tests (#5178)
zoewangg 1660397
Fix for multipart integ test failure (#5176)
L-Applin 85a8f89
FileAsyncResponseTransformer - write to position (#5241)
L-Applin ee6ebff
add completed to ResumableFileDownload ser/des (#5254)
L-Applin 0ecd657
Pause and resume for multipart download (#5258)
L-Applin d35cb3b
add completed to ResumableFileDownload ser/des
L-Applin 5914453
review comments
L-Applin 09b31b6
Merge branch 'master' into feature/master/s3mpu
L-Applin 6c62bdd
Merge branch 'master' into feature/master/s3mpu
L-Applin 417fe5b
fix ambiguous call to split in test
L-Applin 0042b1d
fix WRITE_TO_POSITION file exist test
L-Applin abb4611
fix logging test
L-Applin 3cde4d2
Merge branch 'master' into feature/master/s3mpu
L-Applin 5755b43
fix java 21 javadoc error
L-Applin fc9b2e4
fix java 21 javadoc error
L-Applin e4ab19b
fix some Sonar issues
L-Applin 404b763
Javadoc update for mulitpart get
L-Applin 6a1f135
changelog entry
L-Applin d3a004a
changelog
L-Applin 5819ab2
Added debug log around entire request and prevent random log leaking …
L-Applin 735fa96
pr comments
L-Applin 9e58e88
Merge branch 'master' into feature/master/s3mpu
L-Applin b10c73e
PR 5164 remaining comments (#5403)
L-Applin e7292e2
Merge branch 'master' into feature/master/s3mpu
L-Applin a52e476
Merge branch 'master' into feature/master/s3mpu
L-Applin 5047516
Add trace logs for debugging multipart download (#5434)
L-Applin d2c1b92
Prevent multipart download from hanging (#5466)
L-Applin eb56b55
Merge branch 'master' into feature/master/s3mpu
L-Applin 49f2af9
Merge branch 'master' into feature/master/s3mpu
L-Applin b202a3a
Merge branch 'master' into feature/master/s3mpu
L-Applin 599b56c
Merge branch 'master' into feature/master/s3mpu
L-Applin 99bea7f
Merge branch 'master' into feature/master/s3mpu
L-Applin 3434f68
Merge branch 'master' into feature/master/s3mpu
L-Applin 0573731
remove trace logs
L-Applin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
...sdk-core/src/main/java/software/amazon/awssdk/core/SplittingTransformerConfiguration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.core; | ||
|
||
import java.util.Objects; | ||
import software.amazon.awssdk.annotations.SdkPublicApi; | ||
import software.amazon.awssdk.core.async.AsyncResponseTransformer; | ||
import software.amazon.awssdk.core.internal.async.SplittingTransformer; | ||
import software.amazon.awssdk.utils.ToString; | ||
import software.amazon.awssdk.utils.Validate; | ||
import software.amazon.awssdk.utils.builder.CopyableBuilder; | ||
import software.amazon.awssdk.utils.builder.ToCopyableBuilder; | ||
|
||
/** | ||
* Configuration options for {@link AsyncResponseTransformer#split(SplittingTransformerConfiguration)} to configure how the SDK | ||
* should split the {@link AsyncResponseTransformer}. | ||
* | ||
* @see #builder() | ||
*/ | ||
@SdkPublicApi | ||
public final class SplittingTransformerConfiguration implements ToCopyableBuilder<SplittingTransformerConfiguration.Builder, | ||
SplittingTransformerConfiguration> { | ||
|
||
private final Long bufferSizeInBytes; | ||
|
||
private SplittingTransformerConfiguration(DefaultBuilder builder) { | ||
this.bufferSizeInBytes = Validate.paramNotNull(builder.bufferSize, "bufferSize"); | ||
} | ||
|
||
/** | ||
* Create a {@link Builder}, used to create a {@link SplittingTransformerConfiguration}. | ||
*/ | ||
public static Builder builder() { | ||
return new DefaultBuilder(); | ||
} | ||
|
||
/** | ||
* @return the buffer size | ||
*/ | ||
public Long bufferSizeInBytes() { | ||
return bufferSizeInBytes; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
SplittingTransformerConfiguration that = (SplittingTransformerConfiguration) o; | ||
|
||
return Objects.equals(bufferSizeInBytes, that.bufferSizeInBytes); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return bufferSizeInBytes != null ? bufferSizeInBytes.hashCode() : 0; | ||
} | ||
L-Applin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
@Override | ||
public String toString() { | ||
return ToString.builder("SplittingTransformerConfiguration") | ||
.add("bufferSizeInBytes", bufferSizeInBytes) | ||
.build(); | ||
} | ||
|
||
@Override | ||
public Builder toBuilder() { | ||
return new DefaultBuilder(this); | ||
} | ||
|
||
public interface Builder extends CopyableBuilder<Builder, SplittingTransformerConfiguration> { | ||
|
||
/** | ||
* Configures the maximum amount of memory in bytes buffered by the {@link SplittingTransformer}. | ||
* | ||
* @param bufferSize the buffer size in bytes | ||
* @return This object for method chaining. | ||
*/ | ||
Builder bufferSizeInBytes(Long bufferSize); | ||
} | ||
|
||
private static final class DefaultBuilder implements Builder { | ||
private Long bufferSize; | ||
|
||
private DefaultBuilder(SplittingTransformerConfiguration configuration) { | ||
this.bufferSize = configuration.bufferSizeInBytes; | ||
} | ||
|
||
private DefaultBuilder() { | ||
} | ||
|
||
@Override | ||
public Builder bufferSizeInBytes(Long bufferSize) { | ||
this.bufferSize = bufferSize; | ||
return this; | ||
} | ||
|
||
@Override | ||
public SplittingTransformerConfiguration build() { | ||
return new SplittingTransformerConfiguration(this); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.