Class PrioritizedOperatorSubtaskState
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState
-
@Internal public class PrioritizedOperatorSubtaskState extends Object
This class is a wrapper over multiple alternativeOperatorSubtaskState
that are (partial) substitutes for each other and imposes a priority ordering over all alternatives for the different states which define an order in which the operator should attempt to restore the state from them. One OperatorSubtaskState is considered as the "ground truth" about which state should be represented. Alternatives may be complete or partial substitutes for the "ground truth" with a higher priority (if they had a lower alternative, they would not really be alternatives). Substitution is determined on a per-sub-state basis.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrioritizedOperatorSubtaskState.Builder
A builder for PrioritizedOperatorSubtaskState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrioritizedOperatorSubtaskState
empty(long restoredCheckpointId)
static PrioritizedOperatorSubtaskState
emptyNotRestored()
Returns an emptyPrioritizedOperatorSubtaskState
singleton for an empty, not-restored operator state.StateObjectCollection<KeyedStateHandle>
getJobManagerManagedKeyedState()
Returns the managed keyed state from the job manager, which represents the ground truth about what this state should represent.StateObjectCollection<OperatorStateHandle>
getJobManagerManagedOperatorState()
Returns the managed operator state from the job manager, which represents the ground truth about what this state should represent.StateObjectCollection<KeyedStateHandle>
getJobManagerRawKeyedState()
Returns the raw keyed state from the job manager, which represents the ground truth about what this state should represent.StateObjectCollection<OperatorStateHandle>
getJobManagerRawOperatorState()
Returns the raw operator state from the job manager, which represents the ground truth about what this state should represent.StateObjectCollection<InputChannelStateHandle>
getPrioritizedInputChannelState()
List<StateObjectCollection<KeyedStateHandle>>
getPrioritizedManagedKeyedState()
Returns an immutable list with all alternative snapshots to restore the managed keyed state, in the order in which we should attempt to restore.List<StateObjectCollection<OperatorStateHandle>>
getPrioritizedManagedOperatorState()
Returns an immutable list with all alternative snapshots to restore the managed operator state, in the order in which we should attempt to restore.List<StateObjectCollection<KeyedStateHandle>>
getPrioritizedRawKeyedState()
Returns an immutable list with all alternative snapshots to restore the raw keyed state, in the order in which we should attempt to restore.List<StateObjectCollection<OperatorStateHandle>>
getPrioritizedRawOperatorState()
Returns an immutable list with all alternative snapshots to restore the raw operator state, in the order in which we should attempt to restore.StateObjectCollection<ResultSubpartitionStateHandle>
getPrioritizedResultSubpartitionState()
Long
getRestoredCheckpointId()
Returns the checkpoint id if this was created for a restored operator, null otherwise.boolean
isRestored()
Returns true if this was created for a restored operator, false otherwise.
-
-
-
Method Detail
-
getPrioritizedManagedOperatorState
@Nonnull public List<StateObjectCollection<OperatorStateHandle>> getPrioritizedManagedOperatorState()
Returns an immutable list with all alternative snapshots to restore the managed operator state, in the order in which we should attempt to restore.
-
getPrioritizedRawOperatorState
@Nonnull public List<StateObjectCollection<OperatorStateHandle>> getPrioritizedRawOperatorState()
Returns an immutable list with all alternative snapshots to restore the raw operator state, in the order in which we should attempt to restore.
-
getPrioritizedManagedKeyedState
@Nonnull public List<StateObjectCollection<KeyedStateHandle>> getPrioritizedManagedKeyedState()
Returns an immutable list with all alternative snapshots to restore the managed keyed state, in the order in which we should attempt to restore.
-
getPrioritizedRawKeyedState
@Nonnull public List<StateObjectCollection<KeyedStateHandle>> getPrioritizedRawKeyedState()
Returns an immutable list with all alternative snapshots to restore the raw keyed state, in the order in which we should attempt to restore.
-
getJobManagerManagedOperatorState
@Nonnull public StateObjectCollection<OperatorStateHandle> getJobManagerManagedOperatorState()
Returns the managed operator state from the job manager, which represents the ground truth about what this state should represent. This is the alternative with lowest priority.
-
getJobManagerRawOperatorState
@Nonnull public StateObjectCollection<OperatorStateHandle> getJobManagerRawOperatorState()
Returns the raw operator state from the job manager, which represents the ground truth about what this state should represent. This is the alternative with lowest priority.
-
getJobManagerManagedKeyedState
@Nonnull public StateObjectCollection<KeyedStateHandle> getJobManagerManagedKeyedState()
Returns the managed keyed state from the job manager, which represents the ground truth about what this state should represent. This is the alternative with lowest priority.
-
getJobManagerRawKeyedState
@Nonnull public StateObjectCollection<KeyedStateHandle> getJobManagerRawKeyedState()
Returns the raw keyed state from the job manager, which represents the ground truth about what this state should represent. This is the alternative with lowest priority.
-
getPrioritizedInputChannelState
@Nonnull public StateObjectCollection<InputChannelStateHandle> getPrioritizedInputChannelState()
-
getPrioritizedResultSubpartitionState
@Nonnull public StateObjectCollection<ResultSubpartitionStateHandle> getPrioritizedResultSubpartitionState()
-
isRestored
public boolean isRestored()
Returns true if this was created for a restored operator, false otherwise. Restored operators are operators that participated in a previous checkpoint, even if they did not emit any state snapshots.
-
getRestoredCheckpointId
@Nullable public Long getRestoredCheckpointId()
Returns the checkpoint id if this was created for a restored operator, null otherwise. Restored operators are operators that participated in a previous checkpoint, even if they did not emit any state snapshots.
-
emptyNotRestored
public static PrioritizedOperatorSubtaskState emptyNotRestored()
Returns an emptyPrioritizedOperatorSubtaskState
singleton for an empty, not-restored operator state.
-
empty
public static PrioritizedOperatorSubtaskState empty(long restoredCheckpointId)
-
-