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

    • Field Detail

      • db

        @Nonnull
        protected org.rocksdb.RocksDB db
        RocksDB instance from the backend.
      • rocksDBResourceGuard

        @Nonnull
        protected final org.apache.flink.util.ResourceGuard rocksDBResourceGuard
        Resource guard for the RocksDB 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.
      • localRecoveryConfig

        @Nonnull
        protected final org.apache.flink.runtime.state.LocalRecoveryConfig localRecoveryConfig
        The configuration for local recovery.
      • instanceBasePath

        @Nonnull
        protected final File instanceBasePath
        Base path of the RocksDB instance.
      • localDirectoryName

        protected final String localDirectoryName
        The local directory name of the current snapshot strategy.
      • backendUID

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

      • prepareLocalSnapshotDirectory

        @Nonnull
        protected org.apache.flink.runtime.state.SnapshotDirectory prepareLocalSnapshotDirectory​(long checkpointId)
                                                                                          throws IOException
        Throws:
        IOException
      • cleanupIncompleteSnapshot

        protected void cleanupIncompleteSnapshot​(@Nonnull
                                                 org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry,
                                                 @Nonnull
                                                 org.apache.flink.runtime.state.SnapshotDirectory localBackupDirectory)
      • 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