Class CachedDataOutputStream
java.lang.Object
java.io.OutputStream
org.apache.flink.core.fs.FSDataOutputStream
org.apache.flink.state.forst.fs.cache.CachedDataOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class CachedDataOutputStream
extends org.apache.flink.core.fs.FSDataOutputStream
A
FSDataOutputStream delegates requests to other one and supports writing data with
ByteBuffer. The data will be written to the original output stream and the cache output
stream. When the stream is closed, the data will be put into the cache and ready to be read.-
Constructor Summary
ConstructorsConstructorDescriptionCachedDataOutputStream(org.apache.flink.core.fs.Path originalPath, org.apache.flink.core.fs.Path cachePath, org.apache.flink.core.fs.FSDataOutputStream originalOutputStream, org.apache.flink.core.fs.FSDataOutputStream cacheOutputStream, FileBasedCache cache) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
CachedDataOutputStream
public CachedDataOutputStream(org.apache.flink.core.fs.Path originalPath, org.apache.flink.core.fs.Path cachePath, org.apache.flink.core.fs.FSDataOutputStream originalOutputStream, @Nullable org.apache.flink.core.fs.FSDataOutputStream cacheOutputStream, FileBasedCache cache)
-
-
Method Details
-
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
-
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.FSDataOutputStream- Throws:
IOException
-