Package org.apache.flink.runtime.state
Interface CheckpointStreamWithResultProvider
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
CheckpointStreamWithResultProvider.PrimaryAndSecondaryStream,CheckpointStreamWithResultProvider.PrimaryStreamOnly
public interface CheckpointStreamWithResultProvider extends Closeable
Interface that provides access to a CheckpointStateOutputStream and a method to provide theSnapshotResult. This abstracts from different ways that a result is obtained from checkpoint output streams.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCheckpointStreamWithResultProvider.KeyedStateHandleFactoryFactory method for aKeyedStateHandleto be used intoKeyedStateHandleSnapshotResult(SnapshotResult, KeyGroupRangeOffsets, KeyedStateHandleFactory).static classCheckpointStreamWithResultProvider.PrimaryAndSecondaryStreamImplementation ofCheckpointStreamWithResultProviderthat creates both, the primary/remote/jm-owned state and the secondary/local/tm-owned state.static classCheckpointStreamWithResultProvider.PrimaryStreamOnlyImplementation ofCheckpointStreamWithResultProviderthat only creates the primary/remote/jm-owned state.
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOG
-
Method Summary
-
-
-
Method Detail
-
closeAndFinalizeCheckpointStreamResult
@Nonnull SnapshotResult<StreamStateHandle> closeAndFinalizeCheckpointStreamResult() throws IOException
Closes the stream ans returns a snapshot result with the stream handle(s).- Throws:
IOException
-
getCheckpointOutputStream
@Nonnull CheckpointStateOutputStream getCheckpointOutputStream()
Returns the encapsulated output stream.
-
close
default void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
createSimpleStream
@Nonnull static CheckpointStreamWithResultProvider createSimpleStream(@Nonnull CheckpointedStateScope checkpointedStateScope, @Nonnull CheckpointStreamFactory primaryStreamFactory) throws IOException
- Throws:
IOException
-
createDuplicatingStream
@Nonnull static CheckpointStreamWithResultProvider createDuplicatingStream(@Nonnegative long checkpointId, @Nonnull CheckpointedStateScope checkpointedStateScope, @Nonnull CheckpointStreamFactory primaryStreamFactory, @Nonnull LocalSnapshotDirectoryProvider secondaryStreamDirProvider) throws IOException
- Throws:
IOException
-
toKeyedStateHandleSnapshotResult
@Nonnull static SnapshotResult<KeyedStateHandle> toKeyedStateHandleSnapshotResult(@Nonnull SnapshotResult<StreamStateHandle> snapshotResult, @Nonnull KeyGroupRangeOffsets keyGroupRangeOffsets, @Nonnull CheckpointStreamWithResultProvider.KeyedStateHandleFactory stateHandleFactory)
Helper method that takes aSnapshotResultand aKeyGroupRangeOffsetsand creates aSnapshotResultby combining the key groups offsets with all the present stream state handles.
-
-