-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
S3Store invokes TransferManager#upload, which says
* When uploading options from a stream, callers <b>must</b> supply the size of
* options in the stream through the content length field in the
* <code>ObjectMetadata</code> parameter.
* If no content length is specified for the input
* stream, then TransferManager will attempt to buffer all the stream
* contents in memory and upload the options as a traditional, single part
* upload. Because the entire stream contents must be buffered in memory,
* this can be very expensive, and should be avoided whenever possible.
When you use too much, you get a java.lang.OutOfMemoryError: Java heap space
It is possible to do multipart uploads to use fixed memory; for reference, this is what Alpakka does for akka-streams:
- Alpakka S3Client#multipartUpload
- Using the AWS Java SDK for a Multipart Upload (Low-Level API)
-
Use the low-level API when you [..] do not know the size of the upload data in advance
-
BalmungSan
Metadata
Metadata
Assignees
Labels
No labels