@PublicEvolving public final class Watermark extends StreamElement
Output.emitWatermark(Watermark). Operators that
do not internally buffer elements can always forward the watermark that they receive. Operators
that buffer elements, such as window operators, must forward a watermark after emission of
elements that is triggered by the arriving watermark.
In some cases a watermark is only a heuristic and operators should be able to deal with late elements. They can either discard those or update the result and emit updates/retractions to downstream operations.
When a source closes it will emit a final watermark with timestamp Long.MAX_VALUE.
When an operator receives this it will know that no more input will be arriving in the future.
| 限定符和类型 | 字段和说明 |
|---|---|
static Watermark |
MAX_WATERMARK
The watermark that signifies end-of-event-time.
|
| 构造器和说明 |
|---|
Watermark(long timestamp)
Creates a new watermark with the given timestamp in milliseconds.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
long |
getTimestamp()
Returns the timestamp associated with this
Watermark in milliseconds. |
int |
hashCode() |
String |
toString() |
asLatencyMarker, asRecord, asStreamStatus, asWatermark, isLatencyMarker, isRecord, isStreamStatus, isWatermarkpublic static final Watermark MAX_WATERMARK
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.