@NotThreadSafe public class S3ALowLevelOutputStream extends ObjectLowLevelOutputStream
Modifier and Type | Field and Description |
---|---|
protected com.amazonaws.services.s3.AmazonS3 |
mClient
The Amazon S3 client to interact with S3.
|
protected String |
mUploadId
The upload id of this multipart upload.
|
mBucketName, mClosed, mFile, mHash, mKey, mLocalOutputStream, mPartitionOffset, mPartitionSize, mRetryPolicy, mSingleCharWrite, mTmpDirs, UPLOAD_THRESHOLD
Constructor and Description |
---|
S3ALowLevelOutputStream(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,
File file,
String md5) |
protected void |
uploadPartInternal(File file,
int partNumber,
boolean isLastPart,
String md5) |
abortMultiPartUpload, close, flush, getPartNumber, uploadPart, uploadPart, waitForAllPartsUpload, write, write, write
protected com.amazonaws.services.s3.AmazonS3 mClient
protected volatile String mUploadId
public S3ALowLevelOutputStream(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(File file, int partNumber, boolean isLastPart, @Nullable String md5) throws IOException
uploadPartInternal
in class ObjectLowLevelOutputStream
IOException
protected void initMultiPartUploadInternal() throws IOException
initMultiPartUploadInternal
in class ObjectLowLevelOutputStream
IOException
protected void completeMultiPartUploadInternal() throws IOException
completeMultiPartUploadInternal
in class ObjectLowLevelOutputStream
IOException
protected void abortMultiPartUploadInternal() throws IOException
abortMultiPartUploadInternal
in class ObjectLowLevelOutputStream
IOException
protected void createEmptyObject(String key) throws IOException
createEmptyObject
in class ObjectLowLevelOutputStream
IOException
protected void putObject(String key, File file, @Nullable String md5) throws IOException
putObject
in class ObjectLowLevelOutputStream
IOException
protected com.amazonaws.services.s3.AmazonS3 getClient()
Copyright © 2023. All Rights Reserved.