@NotThreadSafe public class S3AMultipartUploadOutputStream extends ObjectMultipartUploadOutputStream
Modifier and Type | Field and Description |
---|---|
protected String |
mUploadId
The upload id of this multipart upload.
|
MAXIMUM_PART_SIZE, mBucketName, mClosed, MINIMUM_PART_SIZE, mKey, mPartitionOffset, mPartitionSize, mRetryPolicy, mSingleCharWrite
Constructor and Description |
---|
S3AMultipartUploadOutputStream(String bucketName,
String key,
com.amazonaws.services.s3.AmazonS3 s3Client,
com.google.common.util.concurrent.ListeningExecutorService executor,
AlluxioConfiguration ufsConf)
Constructs a new stream for writing a file.
|
Modifier and Type | Method and Description |
---|---|
protected void |
abortMultipartUploadInternal() |
protected void |
completeMultipartUploadInternal() |
protected void |
createEmptyObject(String key) |
protected com.amazonaws.services.s3.AmazonS3 |
getClient() |
Optional<String> |
getContentHash() |
protected void |
initMultipartUploadInternal() |
protected void |
putObject(String key,
byte[] buf,
long length) |
protected void |
uploadPartInternal(byte[] buf,
int partNumber,
boolean isLastPart,
long length) |
abortMultiPartUpload, close, flush, uploadPart, uploadPart, waitForAllPartsUpload, write, write, write
protected volatile String mUploadId
public S3AMultipartUploadOutputStream(String bucketName, String key, com.amazonaws.services.s3.AmazonS3 s3Client, com.google.common.util.concurrent.ListeningExecutorService executor, AlluxioConfiguration ufsConf)
bucketName
- the name of the bucketkey
- the key of the files3Client
- the Amazon S3 client to upload the file withexecutor
- a thread pool executorufsConf
- the object store under file system configurationprotected void uploadPartInternal(byte[] buf, int partNumber, boolean isLastPart, long length) throws IOException
uploadPartInternal
in class ObjectMultipartUploadOutputStream
buf
- the byte bufpartNumber
- the part numberisLastPart
- whether this is the last partlength
- the length of the part to be uploadedIOException
protected void initMultipartUploadInternal() throws IOException
initMultipartUploadInternal
in class ObjectMultipartUploadOutputStream
IOException
protected void completeMultipartUploadInternal() throws IOException
completeMultipartUploadInternal
in class ObjectMultipartUploadOutputStream
IOException
protected void abortMultipartUploadInternal() throws IOException
abortMultipartUploadInternal
in class ObjectMultipartUploadOutputStream
IOException
protected void createEmptyObject(String key) throws IOException
createEmptyObject
in class ObjectMultipartUploadOutputStream
key
- the keyIOException
protected void putObject(String key, byte[] buf, long length) throws IOException
putObject
in class ObjectMultipartUploadOutputStream
key
- the keybuf
- the byte buflength
- the length of the file to be uploadedIOException
protected com.amazonaws.services.s3.AmazonS3 getClient()
Copyright © 2023. All Rights Reserved.