Class ChangelogMigrationRestoreTarget<K>
- java.lang.Object
-
- org.apache.flink.state.changelog.restore.ChangelogMigrationRestoreTarget<K>
-
- All Implemented Interfaces:
ChangelogRestoreTarget<K>
public class ChangelogMigrationRestoreTarget<K> extends Object implements ChangelogRestoreTarget<K>
AChangelogRestoreTargetsupports to migrate to the delegated keyed state backend.
-
-
Constructor Summary
Constructors Constructor Description ChangelogMigrationRestoreTarget(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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.ChangelogStategetExistingState(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.KeyGroupRangegetKeyGroupRange()Returns the key groups which this restore procedure covers.org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>getRestoredKeyedStateBackend()Returns keyed state backend restored finally.
-
-
-
Constructor Detail
-
ChangelogMigrationRestoreTarget
public ChangelogMigrationRestoreTarget(org.apache.flink.runtime.state.AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
-
-
Method Detail
-
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,V> S createKeyedState(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>
-
-