Package org.apache.flink.runtime.state
Class AbstractIncrementalStateHandle
- java.lang.Object
-
- org.apache.flink.runtime.state.AbstractIncrementalStateHandle
-
- All Implemented Interfaces:
Serializable,CheckpointBoundKeyedStateHandle,CompositeStateHandle,IncrementalKeyedStateHandle,KeyedStateHandle,StateObject
- Direct Known Subclasses:
IncrementalLocalKeyedStateHandle,IncrementalRemoteKeyedStateHandle
public abstract class AbstractIncrementalStateHandle extends Object implements IncrementalKeyedStateHandle
Abstract superclass for allIncrementalKeyedStateHandle.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.IncrementalKeyedStateHandle
IncrementalKeyedStateHandle.HandleAndLocalPath
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.StateObject
StateObject.StateObjectLocation, StateObject.StateObjectSizeStatsCollector
-
-
Field Summary
Fields Modifier and Type Field Description protected UUIDbackendIdentifierUUID to identify the backend which created this state handle.protected longcheckpointIdThe checkpoint Id.protected KeyGroupRangekeyGroupRangeThe key-group range covered by this state handle.protected StreamStateHandlemetaStateHandlePrimary meta data state of the incremental checkpoint.protected List<IncrementalKeyedStateHandle.HandleAndLocalPath>sharedStateShared state in the incremental checkpoint.protected StateHandleIDstateHandleIdUnique id for this state handle.
-
Constructor Summary
Constructors Constructor Description AbstractIncrementalStateHandle(UUID backendIdentifier, KeyGroupRange keyGroupRange, long checkpointId, List<IncrementalKeyedStateHandle.HandleAndLocalPath> sharedState, StreamStateHandle metaStateHandle, StateHandleID stateHandleId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)UUIDgetBackendIdentifier()Returns the identifier of the state backend from which this handle was created.longgetCheckpointId()Returns the ID of the checkpoint for which the handle was created or used.KeyedStateHandlegetIntersection(KeyGroupRange keyGroupRange)Returns a state over a range that is the intersection between this handle's key-group range and the provided key-group range.KeyGroupRangegetKeyGroupRange()Returns the range of the key groups contained in the state.StreamStateHandlegetMetaDataStateHandle()List<IncrementalKeyedStateHandle.HandleAndLocalPath>getSharedStateHandles()Returns a list of all shared states and the corresponding localPath in the backend at the time this was created.StateHandleIDgetStateHandleId()Returns a unique state handle id to distinguish with other keyed state handles.inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.state.CheckpointBoundKeyedStateHandle
rebound
-
Methods inherited from interface org.apache.flink.runtime.state.CompositeStateHandle
getCheckpointedSize, registerSharedStates
-
Methods inherited from interface org.apache.flink.runtime.state.StateObject
collectSizeStats, discardState, getStateSize
-
-
-
-
Field Detail
-
checkpointId
protected final long checkpointId
The checkpoint Id.
-
backendIdentifier
protected final UUID backendIdentifier
UUID to identify the backend which created this state handle. This is in creating the key for theSharedStateRegistry.
-
keyGroupRange
protected final KeyGroupRange keyGroupRange
The key-group range covered by this state handle.
-
sharedState
protected final List<IncrementalKeyedStateHandle.HandleAndLocalPath> sharedState
Shared state in the incremental checkpoint.
-
metaStateHandle
protected final StreamStateHandle metaStateHandle
Primary meta data state of the incremental checkpoint.
-
stateHandleId
protected final StateHandleID stateHandleId
Unique id for this state handle.
-
-
Constructor Detail
-
AbstractIncrementalStateHandle
public AbstractIncrementalStateHandle(UUID backendIdentifier, KeyGroupRange keyGroupRange, long checkpointId, List<IncrementalKeyedStateHandle.HandleAndLocalPath> sharedState, StreamStateHandle metaStateHandle, StateHandleID stateHandleId)
-
-
Method Detail
-
getCheckpointId
public long getCheckpointId()
Description copied from interface:CheckpointBoundKeyedStateHandleReturns the ID of the checkpoint for which the handle was created or used.- Specified by:
getCheckpointIdin interfaceCheckpointBoundKeyedStateHandle
-
getBackendIdentifier
@Nonnull public UUID getBackendIdentifier()
Description copied from interface:IncrementalKeyedStateHandleReturns the identifier of the state backend from which this handle was created.- Specified by:
getBackendIdentifierin interfaceIncrementalKeyedStateHandle
-
getKeyGroupRange
public KeyGroupRange getKeyGroupRange()
Description copied from interface:KeyedStateHandleReturns the range of the key groups contained in the state.- Specified by:
getKeyGroupRangein interfaceKeyedStateHandle
-
getSharedStateHandles
@Nonnull public List<IncrementalKeyedStateHandle.HandleAndLocalPath> getSharedStateHandles()
Description copied from interface:IncrementalKeyedStateHandleReturns a list of all shared states and the corresponding localPath in the backend at the time this was created.- Specified by:
getSharedStateHandlesin interfaceIncrementalKeyedStateHandle
-
getMetaDataStateHandle
@Nonnull public StreamStateHandle getMetaDataStateHandle()
- Specified by:
getMetaDataStateHandlein interfaceIncrementalKeyedStateHandle
-
getStateHandleId
public StateHandleID getStateHandleId()
Description copied from interface:KeyedStateHandleReturns a unique state handle id to distinguish with other keyed state handles.If this state handle would be used as materialized part of ChangelogStateBackendHandle, it should persist this state handle id when serializing of checkpoint and deserialize it back to ensure the state handle id is constant.- Specified by:
getStateHandleIdin interfaceKeyedStateHandle- Returns:
- A unique state handle id.
-
getIntersection
public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange)
Description copied from interface:KeyedStateHandleReturns a state over a range that is the intersection between this handle's key-group range and the provided key-group range.- Specified by:
getIntersectionin interfaceKeyedStateHandle- Parameters:
keyGroupRange- The key group range to intersect with, will return null if the intersection of this handle's key-group and the provided key-group is empty.
-
-