@VisibleForTesting protected static class StatusWatermarkValve.SubpartitionStatus extends Object
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:
NOTE: This class implements HeapPriorityQueue.HeapPriorityQueueElement
to be managed by StatusWatermarkValve.alignedSubpartitionStatuses
to help find minimum watermark.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isWatermarkAligned |
static int |
NOT_CONTAINED
The index that indicates that a
HeapPriorityQueueElement object is not contained
in and managed by any HeapPriorityQueue . |
protected long |
watermark |
protected WatermarkStatus |
watermarkStatus |
Modifier | Constructor and Description |
---|---|
protected |
SubpartitionStatus() |
Modifier and Type | Method and Description |
---|---|
int |
getInternalIndex()
Returns the current index of this object in the internal array of
HeapPriorityQueue . |
void |
setInternalIndex(int newIndex)
Sets the current index of this object in the
HeapPriorityQueue and should only be
called by the owning HeapPriorityQueue . |
protected long watermark
protected WatermarkStatus watermarkStatus
protected boolean isWatermarkAligned
public static final int NOT_CONTAINED
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
.public int getInternalIndex()
HeapPriorityQueue
.public void setInternalIndex(int newIndex)
HeapPriorityQueue
and should only be
called by the owning HeapPriorityQueue
.newIndex
- the new index in the timer heap.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.