Package alluxio.underfs.oss
Class OSSLowLevelOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- alluxio.underfs.ObjectLowLevelOutputStream
-
- alluxio.underfs.oss.OSSLowLevelOutputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class OSSLowLevelOutputStream extends alluxio.underfs.ObjectLowLevelOutputStreamObjectLowLevelOutputStreamimplement for OSS.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringmUploadIdThe upload id of this multipart upload.
-
Constructor Summary
Constructors Constructor Description OSSLowLevelOutputStream(java.lang.String bucketName, java.lang.String key, com.aliyun.oss.OSS oss, com.google.common.util.concurrent.ListeningExecutorService executor, alluxio.conf.AlluxioConfiguration ufsConf)Constructs a new stream for writing a file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidabortMultiPartUploadInternal()protected voidcompleteMultiPartUploadInternal()protected voidcreateEmptyObject(java.lang.String key)protected com.aliyun.oss.OSSgetClient()protected voidinitMultiPartUploadInternal()protected voidputObject(java.lang.String key, java.io.File file, java.lang.String md5)protected voiduploadPartInternal(java.io.File file, int partNumber, boolean isLastPart, java.lang.String md5)
-
-
-
Constructor Detail
-
OSSLowLevelOutputStream
public OSSLowLevelOutputStream(java.lang.String bucketName, java.lang.String key, com.aliyun.oss.OSS oss, com.google.common.util.concurrent.ListeningExecutorService executor, alluxio.conf.AlluxioConfiguration ufsConf)Constructs a new stream for writing a file.- Parameters:
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 configuration
-
-
Method Detail
-
abortMultiPartUploadInternal
protected void abortMultiPartUploadInternal() throws java.io.IOException- Specified by:
abortMultiPartUploadInternalin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
uploadPartInternal
protected void uploadPartInternal(java.io.File file, int partNumber, boolean isLastPart, java.lang.String md5) throws java.io.IOException- Specified by:
uploadPartInternalin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
initMultiPartUploadInternal
protected void initMultiPartUploadInternal() throws java.io.IOException- Specified by:
initMultiPartUploadInternalin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
completeMultiPartUploadInternal
protected void completeMultiPartUploadInternal() throws java.io.IOException- Specified by:
completeMultiPartUploadInternalin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
createEmptyObject
protected void createEmptyObject(java.lang.String key) throws java.io.IOException- Specified by:
createEmptyObjectin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
putObject
protected void putObject(java.lang.String key, java.io.File file, java.lang.String md5) throws java.io.IOException- Specified by:
putObjectin classalluxio.underfs.ObjectLowLevelOutputStream- Throws:
java.io.IOException
-
getClient
protected com.aliyun.oss.OSS getClient()
-
-