Interface ChangelogRestoreTarget<K>
- All Known Implementing Classes:
ChangelogMigrationRestoreTarget
@Internal
public interface ChangelogRestoreTarget<K>
Maintains metadata operation related to Changelog recovery.
-
Method Summary
Modifier and TypeMethodDescription<N,S extends org.apache.flink.api.common.state.State, V>
ScreateKeyedState(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 bygetExistingState(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 aKeyGroupedInternalPriorityQueuewhich could be retrieved bygetExistingState(String, BackendStateType)in the restore procedure.getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) Returns the existing state created bycreateKeyedState(TypeSerializer, StateDescriptor)orcreatePqState(String, TypeSerializer)in the restore procedure.org.apache.flink.runtime.state.KeyGroupRangeReturns 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, S createKeyedStateV> (org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S, V> stateDescriptor) throws ExceptionCreates a keyed state which could be retrieved bygetExistingState(String, BackendStateType)in the restore procedure. The interface comes fromKeyedStateBackend.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 aKeyGroupedInternalPriorityQueuewhich could be retrieved bygetExistingState(String, BackendStateType)in the restore procedure. The interface comes fromPriorityQueueSetFactory.create(String, TypeSerializer). -
getExistingState
ChangelogState getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) Returns the existing state created bycreateKeyedState(TypeSerializer, StateDescriptor)orcreatePqState(String, TypeSerializer)in the restore procedure. -
getRestoredKeyedStateBackend
org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> getRestoredKeyedStateBackend()Returns keyed state backend restored finally.
-