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 UUID
backendIdentifier
UUID to identify the backend which created this state handle.protected long
checkpointId
The checkpoint Id.protected KeyGroupRange
keyGroupRange
The key-group range covered by this state handle.protected StreamStateHandle
metaStateHandle
Primary meta data state of the incremental checkpoint.protected List<IncrementalKeyedStateHandle.HandleAndLocalPath>
sharedState
Shared state in the incremental checkpoint.protected StateHandleID
stateHandleId
Unique 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 boolean
equals(Object o)
UUID
getBackendIdentifier()
Returns the identifier of the state backend from which this handle was created.long
getCheckpointId()
Returns the ID of the checkpoint for which the handle was created or used.KeyedStateHandle
getIntersection(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.KeyGroupRange
getKeyGroupRange()
Returns the range of the key groups contained in the state.StreamStateHandle
getMetaDataStateHandle()
List<IncrementalKeyedStateHandle.HandleAndLocalPath>
getSharedStateHandles()
Returns a list of all shared states and the corresponding localPath in the backend at the time this was created.StateHandleID
getStateHandleId()
Returns a unique state handle id to distinguish with other keyed state handles.int
hashCode()
String
toString()
-
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:CheckpointBoundKeyedStateHandle
Returns the ID of the checkpoint for which the handle was created or used.- Specified by:
getCheckpointId
in interfaceCheckpointBoundKeyedStateHandle
-
getBackendIdentifier
@Nonnull public UUID getBackendIdentifier()
Description copied from interface:IncrementalKeyedStateHandle
Returns the identifier of the state backend from which this handle was created.- Specified by:
getBackendIdentifier
in interfaceIncrementalKeyedStateHandle
-
getKeyGroupRange
public KeyGroupRange getKeyGroupRange()
Description copied from interface:KeyedStateHandle
Returns the range of the key groups contained in the state.- Specified by:
getKeyGroupRange
in interfaceKeyedStateHandle
-
getSharedStateHandles
@Nonnull public List<IncrementalKeyedStateHandle.HandleAndLocalPath> getSharedStateHandles()
Description copied from interface:IncrementalKeyedStateHandle
Returns a list of all shared states and the corresponding localPath in the backend at the time this was created.- Specified by:
getSharedStateHandles
in interfaceIncrementalKeyedStateHandle
-
getMetaDataStateHandle
@Nonnull public StreamStateHandle getMetaDataStateHandle()
- Specified by:
getMetaDataStateHandle
in interfaceIncrementalKeyedStateHandle
-
getStateHandleId
public StateHandleID getStateHandleId()
Description copied from interface:KeyedStateHandle
Returns 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:
getStateHandleId
in interfaceKeyedStateHandle
- Returns:
- A unique state handle id.
-
getIntersection
public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange)
Description copied from interface:KeyedStateHandle
Returns a state over a range that is the intersection between this handle's key-group range and the provided key-group range.- Specified by:
getIntersection
in 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.
-
-