@PublicEvolving @NotThreadSafe public class OSSRecoverableFsDataOutputStream extends org.apache.flink.core.fs.RecoverableFsDataOutputStream
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.
| Constructor and Description |
|---|
OSSRecoverableFsDataOutputStream(long ossUploadPartSize,
org.apache.flink.util.function.FunctionWithException<File,org.apache.flink.core.fs.RefCountedFileWithStream,IOException> cachedFileCreator,
OSSRecoverableMultipartUpload upload,
long sizeBeforeCurrentPart) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.flink.core.fs.RecoverableFsDataOutputStream.Committer |
closeForCommit() |
void |
flush() |
long |
getPos() |
org.apache.flink.core.fs.RecoverableWriter.ResumeRecoverable |
persist() |
void |
sync() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
writepublic OSSRecoverableFsDataOutputStream(long ossUploadPartSize,
org.apache.flink.util.function.FunctionWithException<File,org.apache.flink.core.fs.RefCountedFileWithStream,IOException> cachedFileCreator,
OSSRecoverableMultipartUpload upload,
long sizeBeforeCurrentPart)
throws IOException
IOExceptionpublic org.apache.flink.core.fs.RecoverableWriter.ResumeRecoverable persist()
throws IOException
persist in class org.apache.flink.core.fs.RecoverableFsDataOutputStreamIOExceptionpublic org.apache.flink.core.fs.RecoverableFsDataOutputStream.Committer closeForCommit()
throws IOException
closeForCommit in class org.apache.flink.core.fs.RecoverableFsDataOutputStreamIOExceptionpublic long getPos()
throws IOException
getPos in class org.apache.flink.core.fs.FSDataOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class org.apache.flink.core.fs.FSDataOutputStreamIOExceptionpublic void sync()
throws IOException
sync in class org.apache.flink.core.fs.FSDataOutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.flink.core.fs.RecoverableFsDataOutputStreamIOExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.