Class ForStSnapshotStrategyBase<K,​R extends org.apache.flink.runtime.state.SnapshotResources>

  • 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,​R>
    Direct Known Subclasses:
    ForStNativeFullSnapshotStrategy

    public abstract class ForStSnapshotStrategyBase<K,​R extends org.apache.flink.runtime.state.SnapshotResources>
    extends Object
    implements org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.runtime.state.SnapshotStrategy<org.apache.flink.runtime.state.KeyedStateHandle,​R>, AutoCloseable
    Abstract base class for SnapshotStrategy implementations for ForSt state backend.
    • Field Detail

      • db

        @Nonnull
        protected final org.forstdb.RocksDB db
        ForSt instance from the backend.
      • resourceGuard

        @Nonnull
        protected final org.apache.flink.util.ResourceGuard resourceGuard
        Resource guard for the ForSt instance.
      • keySerializer

        @Nonnull
        protected final org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer
        The key serializer of the backend.
      • keyGroupRange

        @Nonnull
        protected final org.apache.flink.runtime.state.KeyGroupRange keyGroupRange
        The key-group range for the task.
      • keyGroupPrefixBytes

        @Nonnegative
        protected final int keyGroupPrefixBytes
        Number of bytes in the key-group prefix.
      • backendUID

        @Nonnull
        protected final UUID backendUID
        The state handle ids of all sst files materialized in snapshots for previous checkpoints.
    • Constructor Detail

      • ForStSnapshotStrategyBase

        public ForStSnapshotStrategyBase​(@Nonnull
                                         String description,
                                         @Nonnull
                                         org.forstdb.RocksDB db,
                                         @Nonnull
                                         org.apache.flink.util.ResourceGuard resourceGuard,
                                         @Nonnull
                                         ForStResourceContainer resourceContainer,
                                         @Nonnull
                                         org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
                                         @Nonnull
                                         LinkedHashMap<String,​ForStOperationUtils.ForStKvStateInfo> kvStateInformation,
                                         @Nonnull
                                         org.apache.flink.runtime.state.KeyGroupRange keyGroupRange,
                                         @Nonnegative
                                         int keyGroupPrefixBytes,
                                         @Nonnull
                                         UUID backendUID)
    • Method Detail

      • getDescription

        @Nonnull
        public String getDescription()
      • materializeMetaData

        @Nonnull
        protected org.apache.flink.runtime.state.SnapshotResult<org.apache.flink.runtime.state.StreamStateHandle> materializeMetaData​(@Nonnull
                                                                                                                                      org.apache.flink.core.fs.CloseableRegistry snapshotCloseableRegistry,
                                                                                                                                      @Nonnull
                                                                                                                                      org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry,
                                                                                                                                      @Nonnull
                                                                                                                                      List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots,
                                                                                                                                      long checkpointId,
                                                                                                                                      @Nonnull
                                                                                                                                      org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory)
                                                                                                                               throws Exception
        Throws:
        Exception