@NotThreadSafe public class TOSLowLevelOutputStream extends ObjectLowLevelOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected com.volcengine.tos.TOSV2 |
mClient
The TOS client to interact with TOS.
|
protected java.lang.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 |
|---|
TOSLowLevelOutputStream(java.lang.String bucketName,
java.lang.String key,
com.volcengine.tos.TOSV2 tosClient,
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(java.lang.String key) |
protected com.volcengine.tos.TOSV2 |
getClient() |
java.util.Optional<java.lang.String> |
getContentHash() |
protected void |
initMultiPartUploadInternal() |
protected void |
putObject(java.lang.String key,
java.io.File file,
java.lang.String md5) |
protected void |
uploadPartInternal(java.io.File file,
int partNumber,
boolean isLastPart,
java.lang.String md5) |
abortMultiPartUpload, close, flush, getPartNumber, uploadPart, uploadPart, waitForAllPartsUpload, write, write, writeprotected com.volcengine.tos.TOSV2 mClient
protected volatile java.lang.String mUploadId
public TOSLowLevelOutputStream(java.lang.String bucketName,
java.lang.String key,
com.volcengine.tos.TOSV2 tosClient,
com.google.common.util.concurrent.ListeningExecutorService executor,
AlluxioConfiguration ufsConf)
bucketName - the name of the bucketkey - the key of the filetosClient - the TOS client to upload the file withexecutor - a thread pool executorufsConf - the object store under file system configurationprotected void abortMultiPartUploadInternal()
throws java.io.IOException
abortMultiPartUploadInternal in class ObjectLowLevelOutputStreamjava.io.IOExceptionprotected void uploadPartInternal(java.io.File file,
int partNumber,
boolean isLastPart,
@Nullable
java.lang.String md5)
throws java.io.IOException
uploadPartInternal in class ObjectLowLevelOutputStreamjava.io.IOExceptionprotected void initMultiPartUploadInternal()
throws java.io.IOException
initMultiPartUploadInternal in class ObjectLowLevelOutputStreamjava.io.IOExceptionprotected void completeMultiPartUploadInternal()
completeMultiPartUploadInternal in class ObjectLowLevelOutputStreamprotected void createEmptyObject(java.lang.String key)
createEmptyObject in class ObjectLowLevelOutputStreamprotected void putObject(java.lang.String key,
java.io.File file,
@Nullable
java.lang.String md5)
throws java.io.IOException
putObject in class ObjectLowLevelOutputStreamjava.io.IOExceptionpublic java.util.Optional<java.lang.String> getContentHash()
protected com.volcengine.tos.TOSV2 getClient()
Copyright © 2024. All Rights Reserved.