Class RocksIncrementalSnapshotStrategy<K>
java.lang.Object
org.apache.flink.state.rocksdb.snapshot.RocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
org.apache.flink.state.rocksdb.snapshot.RocksIncrementalSnapshotStrategy<K>
- Type Parameters:
K- type of the backend keys.
- All Implemented Interfaces:
AutoCloseable,org.apache.flink.api.common.state.CheckpointListener,org.apache.flink.runtime.state.SnapshotStrategy<org.apache.flink.runtime.state.KeyedStateHandle,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
public class RocksIncrementalSnapshotStrategy<K>
extends RocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
Snapshot strategy for
RocksDBKeyedStateBackend that is
based on RocksDB's native checkpoints and creates incremental snapshots.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.state.rocksdb.snapshot.RocksDBSnapshotStrategyBase
RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources, RocksDBSnapshotStrategyBase.PreviousSnapshot, RocksDBSnapshotStrategyBase.RocksDBSnapshotOperationNested classes/interfaces inherited from interface org.apache.flink.runtime.state.SnapshotStrategy
org.apache.flink.runtime.state.SnapshotStrategy.SnapshotResultSupplier<S extends org.apache.flink.runtime.state.StateObject> -
Field Summary
Fields inherited from class org.apache.flink.state.rocksdb.snapshot.RocksDBSnapshotStrategyBase
backendUID, db, EMPTY_PREVIOUS_SNAPSHOT, instanceBasePath, keyGroupPrefixBytes, keyGroupRange, keySerializer, kvStateInformation, localDirectoryName, localRecoveryConfig, rocksDBResourceGuard -
Constructor Summary
ConstructorsConstructorDescriptionRocksIncrementalSnapshotStrategy(org.rocksdb.RocksDB db, org.apache.flink.util.ResourceGuard rocksDBResourceGuard, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, org.apache.flink.runtime.state.KeyGroupRange keyGroupRange, int keyGroupPrefixBytes, org.apache.flink.runtime.state.LocalRecoveryConfig localRecoveryConfig, File instanceBasePath, UUID backendUID, SortedMap<Long, Collection<org.apache.flink.runtime.state.IncrementalKeyedStateHandle.HandleAndLocalPath>> uploadedStateHandles, RocksDBStateUploader rocksDBStateUploader, long lastCompletedCheckpointId) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.runtime.state.SnapshotStrategy.SnapshotResultSupplier<org.apache.flink.runtime.state.KeyedStateHandle>asyncSnapshot(RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources snapshotResources, long checkpointId, long timestamp, org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions) voidclose()voidnotifyCheckpointAborted(long abortedCheckpointId) voidnotifyCheckpointComplete(long completedCheckpointId) snapshotMetaData(long checkpointId, List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots) Methods inherited from class org.apache.flink.state.rocksdb.snapshot.RocksDBSnapshotStrategyBase
cleanupIncompleteSnapshot, getDescription, materializeMetaData, prepareLocalSnapshotDirectory, syncPrepareResources
-
Constructor Details
-
RocksIncrementalSnapshotStrategy
public RocksIncrementalSnapshotStrategy(@Nonnull org.rocksdb.RocksDB db, @Nonnull org.apache.flink.util.ResourceGuard rocksDBResourceGuard, @Nonnull org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, @Nonnull LinkedHashMap<String, RocksDBKeyedStateBackend.RocksDbKvStateInfo> kvStateInformation, @Nonnull org.apache.flink.runtime.state.KeyGroupRange keyGroupRange, @Nonnegative int keyGroupPrefixBytes, @Nonnull org.apache.flink.runtime.state.LocalRecoveryConfig localRecoveryConfig, @Nonnull File instanceBasePath, @Nonnull UUID backendUID, @Nonnull SortedMap<Long, Collection<org.apache.flink.runtime.state.IncrementalKeyedStateHandle.HandleAndLocalPath>> uploadedStateHandles, @Nonnull RocksDBStateUploader rocksDBStateUploader, long lastCompletedCheckpointId)
-
-
Method Details
-
asyncSnapshot
public org.apache.flink.runtime.state.SnapshotStrategy.SnapshotResultSupplier<org.apache.flink.runtime.state.KeyedStateHandle> asyncSnapshot(RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources snapshotResources, long checkpointId, long timestamp, @Nonnull org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory, @Nonnull org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions) -
notifyCheckpointComplete
public void notifyCheckpointComplete(long completedCheckpointId) -
notifyCheckpointAborted
public void notifyCheckpointAborted(long abortedCheckpointId) -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classRocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources> - Throws:
IOException
-
snapshotMetaData
protected RocksDBSnapshotStrategyBase.PreviousSnapshot snapshotMetaData(long checkpointId, @Nonnull List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots) - Specified by:
snapshotMetaDatain classRocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
-