Class PrioritizedOperatorSubtaskState

java.lang.Object
org.apache.flink.runtime.checkpoint.PrioritizedOperatorSubtaskState

@Internal public class PrioritizedOperatorSubtaskState extends Object
This class is a wrapper over multiple alternative OperatorSubtaskState 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.
  • Method Details

    • 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 empty PrioritizedOperatorSubtaskState singleton for an empty, not-restored operator state.
    • empty

      public static PrioritizedOperatorSubtaskState empty(long restoredCheckpointId)