Interface FileMergingCheckpointStateOutputStream.FileMergingSnapshotManagerProxy
- Enclosing class:
- FileMergingCheckpointStateOutputStream
public static interface FileMergingCheckpointStateOutputStream.FileMergingSnapshotManagerProxy
A proxy of the
FileMergingSnapshotManager that owns this FileMergingCheckpointStateOutputStream, with the interfaces for dealing with physical files.-
Method Summary
Modifier and TypeMethodDescriptioncloseStreamAndCreateStateHandle(org.apache.flink.core.fs.Path filePath, long startPos, long stateSize) Close the stream and create aSegmentFileStateHandlefor a file segment.voidNotify theFileMergingSnapshotManagerthat the stream is closed exceptionally.org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.core.fs.FSDataOutputStream,org.apache.flink.core.fs.Path> Provide a physical file.
-
Method Details
-
providePhysicalFile
org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.core.fs.FSDataOutputStream,org.apache.flink.core.fs.Path> providePhysicalFile() throws IOExceptionProvide 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 aSegmentFileStateHandlefor 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
Notify theFileMergingSnapshotManagerthat the stream is closed exceptionally.- Throws:
IOException- if any exception happens when deleting the file.
-