public class OBSLowLevelOutputStream extends ObjectLowLevelOutputStream
ObjectLowLevelOutputStream
implement for OBS.Modifier and Type | Field and Description |
---|---|
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 |
---|
OBSLowLevelOutputStream(String bucketName,
String key,
com.obs.services.IObsClient obsClient,
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.obs.services.IObsClient |
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 OBSLowLevelOutputStream(String bucketName, String key, com.obs.services.IObsClient obsClient, com.google.common.util.concurrent.ListeningExecutorService executor, AlluxioConfiguration ufsConf)
bucketName
- the name of the bucketkey
- the key of the fileobsClient
- the OBS 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, 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, String md5) throws IOException
putObject
in class ObjectLowLevelOutputStream
IOException
protected com.obs.services.IObsClient getClient()
Copyright © 2023. All Rights Reserved.