Introduce s3 client manager and s3 uploaders #458
Merged
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.
This PR enhances the S3writer in a few ways:
S3Uploader
class. This change simplifies the implementation of uploads to S3 using alternative APIs, such asMultiPartUpload
orTransferManager
. This ensures backwards compatibility so newer implementations are easier to roll out. New config is added to reference the uploader class:optional string uploaderClass = "com.pinterest.singer.writer.s3.PutObjectUploader"
S3ClientManager
which will create a new client per region. New S3Writer config for region:optional string region = "us-east-1"
. Additionally, we remove theS3Client.close()
call in S3Writer since clients are shared resources.S3ObjectUpload
to encapsulate an upload. Useful if metadata needs to be attached to each upload in the futureObjectUploaderTask -> PutObjectUpolader
to match pluggable uploader class. Functionality remains the same