public class ChangelogMigrationRestoreTarget<K> extends Object implements ChangelogRestoreTarget<K>
ChangelogRestoreTarget
supports to migrate to the delegated keyed state backend.Constructor and Description |
---|
ChangelogMigrationRestoreTarget(AbstractKeyedStateBackend<K> keyedStateBackend,
ChangelogStateFactory changelogStateFactory) |
Modifier and Type | Method and Description |
---|---|
<N,S extends State,V> |
createKeyedState(TypeSerializer<N> namespaceSerializer,
StateDescriptor<S,V> stateDescriptor)
Creates a keyed state which could be retrieved by
#getExistingState(String,
BackendStateType) in the restore procedure. |
<T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>> |
createPqState(String stateName,
TypeSerializer<T> byteOrderedElementSerializer)
Creates a
KeyGroupedInternalPriorityQueue which could be retrieved by #getExistingState(String, BackendStateType) in the restore procedure. |
ChangelogState |
getExistingState(String name,
StateMetaInfoSnapshot.BackendStateType type)
Returns the existing state created by
ChangelogRestoreTarget.createKeyedState(TypeSerializer,
StateDescriptor) or ChangelogRestoreTarget.createPqState(String, TypeSerializer) in the restore procedure. |
KeyGroupRange |
getKeyGroupRange()
Returns the key groups which this restore procedure covers.
|
CheckpointableKeyedStateBackend<K> |
getRestoredKeyedStateBackend()
Returns keyed state backend restored finally.
|
public ChangelogMigrationRestoreTarget(AbstractKeyedStateBackend<K> keyedStateBackend, ChangelogStateFactory changelogStateFactory)
public KeyGroupRange getKeyGroupRange()
ChangelogRestoreTarget
getKeyGroupRange
in interface ChangelogRestoreTarget<K>
public <N,S extends State,V> S createKeyedState(TypeSerializer<N> namespaceSerializer, StateDescriptor<S,V> stateDescriptor) throws Exception
ChangelogRestoreTarget
#getExistingState(String,
BackendStateType)
in the restore procedure. The interface comes from KeyedStateBackend.getOrCreateKeyedState(TypeSerializer, StateDescriptor)
.createKeyedState
in interface ChangelogRestoreTarget<K>
Exception
@Nonnull public <T extends HeapPriorityQueueElement & PriorityComparable<? super T> & Keyed<?>> KeyGroupedInternalPriorityQueue<T> createPqState(@Nonnull String stateName, @Nonnull TypeSerializer<T> byteOrderedElementSerializer)
ChangelogRestoreTarget
KeyGroupedInternalPriorityQueue
which could be retrieved by #getExistingState(String, BackendStateType)
in the restore procedure. The interface comes
from PriorityQueueSetFactory.create(String, TypeSerializer)
.createPqState
in interface ChangelogRestoreTarget<K>
public ChangelogState getExistingState(String name, StateMetaInfoSnapshot.BackendStateType type)
ChangelogRestoreTarget
ChangelogRestoreTarget.createKeyedState(TypeSerializer,
StateDescriptor)
or ChangelogRestoreTarget.createPqState(String, TypeSerializer)
in the restore procedure.getExistingState
in interface ChangelogRestoreTarget<K>
public CheckpointableKeyedStateBackend<K> getRestoredKeyedStateBackend()
ChangelogRestoreTarget
getRestoredKeyedStateBackend
in interface ChangelogRestoreTarget<K>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.