Class RocksNativeFullSnapshotStrategy<K>
- java.lang.Object
-
- org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
-
- org.apache.flink.contrib.streaming.state.snapshot.RocksNativeFullSnapshotStrategy<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 RocksNativeFullSnapshotStrategy<K> extends RocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
Snapshot strategy forRocksDBKeyedStateBackendbased on RocksDB's native checkpoints and creates full snapshots. the difference between savepoint is that sst files will be uploaded rather than states.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase
RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources, RocksDBSnapshotStrategyBase.PreviousSnapshot, RocksDBSnapshotStrategyBase.RocksDBSnapshotOperation
-
-
Field Summary
-
Fields inherited from class org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase
backendUID, db, EMPTY_PREVIOUS_SNAPSHOT, instanceBasePath, keyGroupPrefixBytes, keyGroupRange, keySerializer, kvStateInformation, localDirectoryName, localRecoveryConfig, rocksDBResourceGuard
-
-
Constructor Summary
Constructors Constructor Description RocksNativeFullSnapshotStrategy(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, RocksDBStateUploader rocksDBStateUploader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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)protected RocksDBSnapshotStrategyBase.PreviousSnapshotsnapshotMetaData(long checkpointId, List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots)-
Methods inherited from class org.apache.flink.contrib.streaming.state.snapshot.RocksDBSnapshotStrategyBase
cleanupIncompleteSnapshot, getDescription, materializeMetaData, prepareLocalSnapshotDirectory, syncPrepareResources
-
-
-
-
Constructor Detail
-
RocksNativeFullSnapshotStrategy
public RocksNativeFullSnapshotStrategy(@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 RocksDBStateUploader rocksDBStateUploader)
-
-
Method Detail
-
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)
-
snapshotMetaData
protected RocksDBSnapshotStrategyBase.PreviousSnapshot snapshotMetaData(long checkpointId, @Nonnull List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots)
- Specified by:
snapshotMetaDatain classRocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classRocksDBSnapshotStrategyBase<K,RocksDBSnapshotStrategyBase.NativeRocksDBSnapshotResources>
-
-