T - The type of the elements that this function can extract timestamps fromAssignerWithPeriodicWatermarks and
AssignerWithPunctuatedWatermarks@Deprecated public interface TimestampExtractor<T> extends org.apache.flink.api.common.functions.Function
The extractor must also keep track of the current watermark. The system will periodically
retrieve this watermark using getCurrentWatermark() and submit it throughout the
topology.
Note: If you know that timestamps are monotonically increasing you can use
AscendingTimestampExtractor. This will keep track of watermarks.
| 限定符和类型 | 方法和说明 |
|---|---|
long |
extractTimestamp(T element,
long currentTimestamp)
已过时。
Extracts a timestamp from an element.
|
long |
extractWatermark(T element,
long currentTimestamp)
已过时。
Asks the extractor if it wants to emit a watermark now that it has seen the given element.
|
long |
getCurrentWatermark()
已过时。
Returns the current watermark.
|
long extractTimestamp(T element, long currentTimestamp)
element - The element that the timestamp is extracted from.currentTimestamp - The current internal timestamp of the element.long extractWatermark(T element, long currentTimestamp)
extractTimestamp(T, long). With the same element. The method
can return Long.MIN_VALUE to indicate that no watermark should be emitted, a value of 0 or
greater will be emitted as a watermark if it is higher than the last-emitted watermark.element - The element that we last saw.currentTimestamp - The current timestamp of the element that we last saw.Long.MIN_VALUE if no watermark should be emitted, positive value for
emitting this value as a watermark.long getCurrentWatermark()
WatermarkCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.