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>
AChangelogRestoreTarget
supports to migrate to the delegated keyed state backend.
-
-
Constructor Summary
Constructors Constructor Description ChangelogMigrationRestoreTarget(AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
-
Method Summary
-
-
-
Constructor Detail
-
ChangelogMigrationRestoreTarget
public ChangelogMigrationRestoreTarget(AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
-
-
Method Detail
-
getKeyGroupRange
public KeyGroupRange getKeyGroupRange()
Description copied from interface:ChangelogRestoreTarget
Returns the key groups which this restore procedure covers.- Specified by:
getKeyGroupRange
in interfaceChangelogRestoreTarget<K>
-
createKeyedState
public <N,S extends State,V> S createKeyedState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,V> stateDescriptor) throws Exception
Description copied from interface:ChangelogRestoreTarget
Creates a keyed state which could be retrieved byChangelogRestoreTarget.getExistingState(String, BackendStateType)
in the restore procedure. The interface comes fromKeyedStateBackend.getOrCreateKeyedState(TypeSerializer, StateDescriptor)
.- Specified by:
createKeyedState
in interfaceChangelogRestoreTarget<K>
- Throws:
Exception
-
createPqState
@Nonnull public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>> KeyGroupedInternalPriorityQueue<T> createPqState(@Nonnull String stateName, @Nonnull TypeSerializer<T> byteOrderedElementSerializer)
Description copied from interface:ChangelogRestoreTarget
Creates aKeyGroupedInternalPriorityQueue
which could be retrieved byChangelogRestoreTarget.getExistingState(String, BackendStateType)
in the restore procedure. The interface comes fromPriorityQueueSetFactory.create(String, TypeSerializer)
.- Specified by:
createPqState
in interfaceChangelogRestoreTarget<K>
-
getExistingState
public ChangelogState getExistingState(String name, StateMetaInfoSnapshot.BackendStateType type)
Description copied from interface:ChangelogRestoreTarget
Returns the existing state created byChangelogRestoreTarget.createKeyedState(TypeSerializer, StateDescriptor)
orChangelogRestoreTarget.createPqState(String, TypeSerializer)
in the restore procedure.- Specified by:
getExistingState
in interfaceChangelogRestoreTarget<K>
-
getRestoredKeyedStateBackend
public CheckpointableKeyedStateBackend<K> getRestoredKeyedStateBackend()
Description copied from interface:ChangelogRestoreTarget
Returns keyed state backend restored finally.- Specified by:
getRestoredKeyedStateBackend
in interfaceChangelogRestoreTarget<K>
-
-