Interface ChangelogRestoreTarget<K>

All Known Implementing Classes:
ChangelogMigrationRestoreTarget

@Internal public interface ChangelogRestoreTarget<K>
Maintains metadata operation related to Changelog recovery.
  • Method Summary

    Modifier and Type
    Method
    Description
    <N, S extends org.apache.flink.api.common.state.State, V>
    S
    createKeyedState(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor)
    Creates a keyed state which could be retrieved by getExistingState(String, BackendStateType) in the restore procedure.
    <T extends org.apache.flink.runtime.state.heap.HeapPriorityQueueElement & org.apache.flink.runtime.state.PriorityComparable<? super T> & org.apache.flink.runtime.state.Keyed<?>>
    org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>
    createPqState(String stateName, org.apache.flink.api.common.typeutils.TypeSerializer<T> byteOrderedElementSerializer)
    Creates a KeyGroupedInternalPriorityQueue which could be retrieved by getExistingState(String, BackendStateType) in the restore procedure.
    getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type)
    Returns the existing state created by createKeyedState(TypeSerializer, StateDescriptor) or createPqState(String, TypeSerializer) in the restore procedure.
    org.apache.flink.runtime.state.KeyGroupRange
    Returns the key groups which this restore procedure covers.
    org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>
    Returns keyed state backend restored finally.
  • Method Details

    • getKeyGroupRange

      org.apache.flink.runtime.state.KeyGroupRange getKeyGroupRange()
      Returns the key groups which this restore procedure covers.
    • createKeyedState

      <N, S extends org.apache.flink.api.common.state.State, V> S createKeyedState(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,V> stateDescriptor) throws Exception
      Creates a keyed state which could be retrieved by getExistingState(String, BackendStateType) in the restore procedure. The interface comes from KeyedStateBackend.getOrCreateKeyedState(TypeSerializer, StateDescriptor).
      Throws:
      Exception
    • createPqState

      @Nonnull <T extends org.apache.flink.runtime.state.heap.HeapPriorityQueueElement & org.apache.flink.runtime.state.PriorityComparable<? super T> & org.apache.flink.runtime.state.Keyed<?>> org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> createPqState(@Nonnull String stateName, @Nonnull org.apache.flink.api.common.typeutils.TypeSerializer<T> byteOrderedElementSerializer)
      Creates a KeyGroupedInternalPriorityQueue which could be retrieved by getExistingState(String, BackendStateType) in the restore procedure. The interface comes from PriorityQueueSetFactory.create(String, TypeSerializer).
    • getExistingState

      ChangelogState getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type)
      Returns the existing state created by createKeyedState(TypeSerializer, StateDescriptor) or createPqState(String, TypeSerializer) in the restore procedure.
    • getRestoredKeyedStateBackend

      org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> getRestoredKeyedStateBackend()
      Returns keyed state backend restored finally.