Interface FileMergingCheckpointStateOutputStream.FileMergingSnapshotManagerProxy
-
- Enclosing class:
- FileMergingCheckpointStateOutputStream
public static interface FileMergingCheckpointStateOutputStream.FileMergingSnapshotManagerProxy
A proxy of theFileMergingSnapshotManager
that owns thisFileMergingCheckpointStateOutputStream
, with the interfaces for dealing with physical files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SegmentFileStateHandle
closeStreamAndCreateStateHandle(org.apache.flink.core.fs.Path filePath, long startPos, long stateSize)
Close the stream and create aSegmentFileStateHandle
for a file segment.void
closeStreamExceptionally()
Notify theFileMergingSnapshotManager
that the stream is closed exceptionally.org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.core.fs.FSDataOutputStream,org.apache.flink.core.fs.Path>
providePhysicalFile()
Provide a physical file.
-
-
-
Method Detail
-
providePhysicalFile
org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.core.fs.FSDataOutputStream,org.apache.flink.core.fs.Path> providePhysicalFile() throws IOException
Provide a physical file.- Returns:
- Output stream and path of the physical file.
- Throws:
IOException
- if the physical file cannot be created or opened.
-
closeStreamAndCreateStateHandle
SegmentFileStateHandle closeStreamAndCreateStateHandle(org.apache.flink.core.fs.Path filePath, long startPos, long stateSize) throws IOException
Close the stream and create aSegmentFileStateHandle
for a file segment.- Parameters:
filePath
- Path of the physical file.startPos
- Start position of the segment in the physical file.stateSize
- Size of the segment.- Returns:
- The state handle of the segment.
- Throws:
IOException
- if any exception happens when closing the file.
-
closeStreamExceptionally
void closeStreamExceptionally() throws IOException
Notify theFileMergingSnapshotManager
that the stream is closed exceptionally.- Throws:
IOException
- if any exception happens when deleting the file.
-
-