Class OSSCommitter
- java.lang.Object
-
- org.apache.flink.fs.osshadoop.writer.OSSCommitter
-
- All Implemented Interfaces:
RecoverableFsDataOutputStream.Committer
public class OSSCommitter extends Object implements RecoverableFsDataOutputStream.Committer
Data object to commit an OSS MultiPartUpload.
-
-
Constructor Summary
Constructors Constructor Description OSSCommitter(OSSAccessor ossAccessor, String objectName, String uploadId, List<com.aliyun.oss.model.PartETag> partETags, long totalLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit()
Commits the file, making it visible.void
commitAfterRecovery()
Commits the file, making it visible.RecoverableWriter.CommitRecoverable
getRecoverable()
Gets a recoverable object to recover the committer.
-
-
-
Constructor Detail
-
OSSCommitter
public OSSCommitter(OSSAccessor ossAccessor, String objectName, String uploadId, List<com.aliyun.oss.model.PartETag> partETags, long totalLength)
-
-
Method Detail
-
commit
public void commit() throws IOException
Description copied from interface:RecoverableFsDataOutputStream.Committer
Commits the file, making it visible. The file will contain the exact data as when the committer was created.- Specified by:
commit
in interfaceRecoverableFsDataOutputStream.Committer
- Throws:
IOException
- Thrown if committing fails.
-
commitAfterRecovery
public void commitAfterRecovery() throws IOException
Description copied from interface:RecoverableFsDataOutputStream.Committer
Commits the file, making it visible. The file will contain the exact data as when the committer was created.This method tolerates situations where the file was already committed and will not raise an exception in that case. This is important for idempotent commit retries as they need to happen after recovery.
- Specified by:
commitAfterRecovery
in interfaceRecoverableFsDataOutputStream.Committer
- Throws:
IOException
- Thrown if committing fails.
-
getRecoverable
public RecoverableWriter.CommitRecoverable getRecoverable()
Description copied from interface:RecoverableFsDataOutputStream.Committer
Gets a recoverable object to recover the committer. The recovered committer will commit the file with the exact same data as this committer would commit it.- Specified by:
getRecoverable
in interfaceRecoverableFsDataOutputStream.Committer
-
-