public class OSSLowLevelOutputStream extends ObjectLowLevelOutputStream
ObjectLowLevelOutputStream
implement for OSS.Modifier and Type | Field and Description |
---|---|
protected String |
mUploadId
The upload id of this multipart upload.
|
LOG, mBucketName, mClosed, mFile, mHash, mKey, mLocalOutputStream, mPartitionOffset, mPartitionSize, mRetryPolicy, mSingleCharWrite, mTmpDirs, UPLOAD_THRESHOLD
Constructor and Description |
---|
OSSLowLevelOutputStream(String bucketName,
String key,
com.aliyun.oss.OSS oss,
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.aliyun.oss.OSS |
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 volatile String mUploadId
public OSSLowLevelOutputStream(String bucketName, String key, com.aliyun.oss.OSS oss, com.google.common.util.concurrent.ListeningExecutorService executor, AlluxioConfiguration ufsConf)
bucketName
- the name of the bucketkey
- the key of the fileoss
- the OSS client to upload the file withexecutor
- a thread pool executorufsConf
- the object store under file system configurationprotected void abortMultiPartUploadInternal() throws IOException
abortMultiPartUploadInternal
in class ObjectLowLevelOutputStream
IOException
protected void uploadPartInternal(File file, int partNumber, boolean isLastPart, 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 createEmptyObject(String key) throws IOException
createEmptyObject
in class ObjectLowLevelOutputStream
IOException
protected void putObject(String key, File file, String md5) throws IOException
putObject
in class ObjectLowLevelOutputStream
IOException
public Optional<String> getContentHash()
protected com.aliyun.oss.OSS getClient()
Copyright © 2023. All Rights Reserved.