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
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 Summary
FieldsFields inherited from interface org.apache.flink.streaming.runtime.watermarkstatus.HeapPriorityQueue.HeapPriorityQueueElement
NOT_CONTAINED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns 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 Details
-
watermark
protected long watermark -
watermarkStatus
-
isWatermarkAligned
protected boolean isWatermarkAligned
-
-
Constructor Details
-
SubpartitionStatus
protected SubpartitionStatus()
-
-
Method Details
-
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.
-