Class StatusWatermarkValve.SubpartitionStatus

  • Enclosing class:
    StatusWatermarkValve

    @VisibleForTesting
    protected static class StatusWatermarkValve.SubpartitionStatus
    extends Object
    An SubpartitionStatus keeps track of a subpartition's last watermark, stream status, and whether or not the subpartition's current watermark is aligned with the overall watermark output from the valve.

    There are 2 situations where a subpartition's watermark is not considered aligned:

    • the current watermark status of the subpartition is idle
    • the watermark status has resumed to be active, but the watermark of the subpartition hasn't caught up to the last output watermark from the valve yet.

    NOTE: This class implements HeapPriorityQueue.HeapPriorityQueueElement to be managed by StatusWatermarkValve.alignedSubpartitionStatuses to help find minimum watermark.

    • Field Detail

      • watermark

        protected long watermark
      • isWatermarkAligned

        protected boolean isWatermarkAligned
      • NOT_CONTAINED

        public static final int NOT_CONTAINED
        The index that indicates that a HeapPriorityQueue.HeapPriorityQueueElement object is not contained in and managed by any HeapPriorityQueue. We do not strictly enforce that internal indexes must be reset to this value when elements are removed from a HeapPriorityQueue.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubpartitionStatus

        protected SubpartitionStatus()
    • Method Detail

      • getInternalIndex

        public int getInternalIndex()
      • setInternalIndex

        public void setInternalIndex​(int newIndex)