Class RocksDBSnapshotStrategyBase.RocksDBSnapshotOperation

  • All Implemented Interfaces:
    org.apache.flink.runtime.state.SnapshotStrategy.SnapshotResultSupplier<org.apache.flink.runtime.state.KeyedStateHandle>
    Enclosing class:
    RocksDBSnapshotStrategyBase<K,​R extends org.apache.flink.runtime.state.SnapshotResources>

    protected abstract class RocksDBSnapshotStrategyBase.RocksDBSnapshotOperation
    extends Object
    implements org.apache.flink.runtime.state.SnapshotStrategy.SnapshotResultSupplier<org.apache.flink.runtime.state.KeyedStateHandle>
    Common operation in native rocksdb snapshot result supplier.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long checkpointId
      Id for the current checkpoint.
      protected org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory
      Stream factory that creates the output streams to DFS.
      protected org.apache.flink.runtime.state.SnapshotDirectory localBackupDirectory
      Local directory for the RocksDB native backup.
      protected List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots
      The state meta data.
      protected org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RocksDBSnapshotOperation​(long checkpointId, org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory, org.apache.flink.runtime.state.SnapshotDirectory localBackupDirectory, List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots)  
    • Field Detail

      • checkpointId

        protected final long checkpointId
        Id for the current checkpoint.
      • checkpointStreamFactory

        @Nonnull
        protected final org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory
        Stream factory that creates the output streams to DFS.
      • stateMetaInfoSnapshots

        @Nonnull
        protected final List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots
        The state meta data.
      • localBackupDirectory

        @Nonnull
        protected final org.apache.flink.runtime.state.SnapshotDirectory localBackupDirectory
        Local directory for the RocksDB native backup.
      • tmpResourcesRegistry

        @Nonnull
        protected final org.apache.flink.core.fs.CloseableRegistry tmpResourcesRegistry
    • Constructor Detail

      • RocksDBSnapshotOperation

        protected RocksDBSnapshotOperation​(long checkpointId,
                                           @Nonnull
                                           org.apache.flink.runtime.state.CheckpointStreamFactory checkpointStreamFactory,
                                           @Nonnull
                                           org.apache.flink.runtime.state.SnapshotDirectory localBackupDirectory,
                                           @Nonnull
                                           List<org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot> stateMetaInfoSnapshots)
    • Method Detail

      • getLocalSnapshot

        protected Optional<org.apache.flink.runtime.state.KeyedStateHandle> getLocalSnapshot​(@Nullable
                                                                                             org.apache.flink.runtime.state.StreamStateHandle localStreamStateHandle,
                                                                                             List<org.apache.flink.runtime.state.IncrementalKeyedStateHandle.HandleAndLocalPath> sharedState)
                                                                                      throws IOException
        Throws:
        IOException