Class ChangelogMigrationRestoreTarget<K>
java.lang.Object
org.apache.flink.state.changelog.restore.ChangelogMigrationRestoreTarget<K>
- All Implemented Interfaces:
ChangelogRestoreTarget<K>
A
ChangelogRestoreTarget supports to migrate to the delegated keyed state backend.-
Constructor Summary
ConstructorsConstructorDescriptionChangelogMigrationRestoreTarget(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory) -
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 byChangelogRestoreTarget.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 aKeyGroupedInternalPriorityQueuewhich could be retrieved byChangelogRestoreTarget.getExistingState(String, BackendStateType)in the restore procedure.getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) Returns the existing state created byChangelogRestoreTarget.createKeyedState(TypeSerializer, StateDescriptor)orChangelogRestoreTarget.createPqState(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.
-
Constructor Details
-
ChangelogMigrationRestoreTarget
public ChangelogMigrationRestoreTarget(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
-
-
Method Details
-
getKeyGroupRange
public org.apache.flink.runtime.state.KeyGroupRange getKeyGroupRange()Description copied from interface:ChangelogRestoreTargetReturns the key groups which this restore procedure covers.- Specified by:
getKeyGroupRangein interfaceChangelogRestoreTarget<K>
-
createKeyedState
public <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 ExceptionDescription copied from interface:ChangelogRestoreTargetCreates a keyed state which could be retrieved byChangelogRestoreTarget.getExistingState(String, BackendStateType)in the restore procedure. The interface comes fromKeyedStateBackend.getOrCreateKeyedState(TypeSerializer, StateDescriptor).- Specified by:
createKeyedStatein interfaceChangelogRestoreTarget<K>- Throws:
Exception
-
createPqState
@Nonnull public <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) Description copied from interface:ChangelogRestoreTargetCreates aKeyGroupedInternalPriorityQueuewhich could be retrieved byChangelogRestoreTarget.getExistingState(String, BackendStateType)in the restore procedure. The interface comes fromPriorityQueueSetFactory.create(String, TypeSerializer).- Specified by:
createPqStatein interfaceChangelogRestoreTarget<K>
-
getExistingState
public ChangelogState getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) Description copied from interface:ChangelogRestoreTargetReturns the existing state created byChangelogRestoreTarget.createKeyedState(TypeSerializer, StateDescriptor)orChangelogRestoreTarget.createPqState(String, TypeSerializer)in the restore procedure.- Specified by:
getExistingStatein interfaceChangelogRestoreTarget<K>
-
getRestoredKeyedStateBackend
public org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> getRestoredKeyedStateBackend()Description copied from interface:ChangelogRestoreTargetReturns keyed state backend restored finally.- Specified by:
getRestoredKeyedStateBackendin interfaceChangelogRestoreTarget<K>
-