Class OSSRecoverableFsDataOutputStream
java.lang.Object
java.io.OutputStream
org.apache.flink.core.fs.FSDataOutputStream
org.apache.flink.core.fs.RecoverableFsDataOutputStream
org.apache.flink.fs.osshadoop.writer.OSSRecoverableFsDataOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
@PublicEvolving
@NotThreadSafe
public class OSSRecoverableFsDataOutputStream
extends org.apache.flink.core.fs.RecoverableFsDataOutputStream
A RecoverableFsDataOutputStream to OSS that is based on a recoverable multipart upload.
This class is NOT thread-safe. Concurrent writes tho this stream result in corrupt or lost data.
The close() method may be called concurrently when cancelling / shutting down. It
will still ensure that local transient resources (like streams and temp files) are cleaned up,
but will not touch data previously persisted in OSS.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.core.fs.RecoverableFsDataOutputStream
org.apache.flink.core.fs.RecoverableFsDataOutputStream.Committer -
Constructor Summary
ConstructorsConstructorDescriptionOSSRecoverableFsDataOutputStream(long ossUploadPartSize, org.apache.flink.util.function.FunctionWithException<File, org.apache.flink.core.fs.RefCountedFileWithStream, IOException> cachedFileCreator, OSSRecoverableMultipartUpload upload, long sizeBeforeCurrentPart) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
OSSRecoverableFsDataOutputStream
public OSSRecoverableFsDataOutputStream(long ossUploadPartSize, org.apache.flink.util.function.FunctionWithException<File, org.apache.flink.core.fs.RefCountedFileWithStream, throws IOExceptionIOException> cachedFileCreator, OSSRecoverableMultipartUpload upload, long sizeBeforeCurrentPart) - Throws:
IOException
-
-
Method Details
-
persist
- Specified by:
persistin classorg.apache.flink.core.fs.RecoverableFsDataOutputStream- Throws:
IOException
-
closeForCommit
public org.apache.flink.core.fs.RecoverableFsDataOutputStream.Committer closeForCommit() throws IOException- Specified by:
closeForCommitin classorg.apache.flink.core.fs.RecoverableFsDataOutputStream- Throws:
IOException
-
getPos
- Specified by:
getPosin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
sync
- Specified by:
syncin classorg.apache.flink.core.fs.FSDataOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.flink.core.fs.RecoverableFsDataOutputStream- Throws:
IOException
-