Class StatusWatermarkValve.SubpartitionStatus
- java.lang.Object
-
- org.apache.flink.streaming.runtime.watermarkstatus.StatusWatermarkValve.SubpartitionStatus
-
- All Implemented Interfaces:
HeapPriorityQueue.HeapPriorityQueueElement
- Enclosing class:
- StatusWatermarkValve
@VisibleForTesting protected static class StatusWatermarkValve.SubpartitionStatus extends Object implements HeapPriorityQueue.HeapPriorityQueueElement
AnSubpartitionStatuskeeps 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.HeapPriorityQueueElementto be managed byStatusWatermarkValve.alignedSubpartitionStatusesto help find minimum watermark.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisWatermarkAlignedprotected longwatermarkprotected WatermarkStatuswatermarkStatus-
Fields inherited from interface org.apache.flink.streaming.runtime.watermarkstatus.HeapPriorityQueue.HeapPriorityQueueElement
NOT_CONTAINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSubpartitionStatus()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetInternalIndex()Returns the current index of this object in the internal array ofHeapPriorityQueue.voidsetInternalIndex(int newIndex)Sets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.
-
-
-
Field Detail
-
watermark
protected long watermark
-
watermarkStatus
protected WatermarkStatus watermarkStatus
-
isWatermarkAligned
protected boolean isWatermarkAligned
-
-
Method Detail
-
getInternalIndex
public int getInternalIndex()
Description copied from interface:HeapPriorityQueue.HeapPriorityQueueElementReturns the current index of this object in the internal array ofHeapPriorityQueue.- Specified by:
getInternalIndexin interfaceHeapPriorityQueue.HeapPriorityQueueElement
-
setInternalIndex
public void setInternalIndex(int newIndex)
Description copied from interface:HeapPriorityQueue.HeapPriorityQueueElementSets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.- Specified by:
setInternalIndexin interfaceHeapPriorityQueue.HeapPriorityQueueElement- Parameters:
newIndex- the new index in the timer heap.
-
-