T - The type of the elements that this function can extract timestamps from@Deprecated @PublicEvolving public abstract class AscendingTimestampExtractor<T> extends Object implements AssignerWithPeriodicWatermarks<T>
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AscendingTimestampExtractor.FailingHandler
已过时。
Handler that fails the program when timestamp monotony is violated.
|
static class |
AscendingTimestampExtractor.IgnoringHandler
已过时。
Handler that does nothing when timestamp monotony is violated.
|
static class |
AscendingTimestampExtractor.LoggingHandler
已过时。
Handler that only logs violations of timestamp monotony, on WARN log level.
|
static interface |
AscendingTimestampExtractor.MonotonyViolationHandler
已过时。
Interface for handlers that handle violations of the monotonous ascending timestamps
property.
|
| 构造器和说明 |
|---|
AscendingTimestampExtractor()
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
abstract long |
extractAscendingTimestamp(T element)
已过时。
Extracts the timestamp from the given element.
|
long |
extractTimestamp(T element,
long elementPrevTimestamp)
已过时。
Assigns a timestamp to an element, in milliseconds since the Epoch.
|
Watermark |
getCurrentWatermark()
已过时。
Returns the current watermark.
|
AscendingTimestampExtractor<T> |
withViolationHandler(AscendingTimestampExtractor.MonotonyViolationHandler handler)
已过时。
Sets the handler for violations to the ascending timestamp order.
|
public abstract long extractAscendingTimestamp(T element)
element - The element that the timestamp is extracted from.public AscendingTimestampExtractor<T> withViolationHandler(AscendingTimestampExtractor.MonotonyViolationHandler handler)
handler - The violation handler to use.public final long extractTimestamp(T element, long elementPrevTimestamp)
TimestampAssignerThe method is passed the previously assigned timestamp of the element. That previous
timestamp may have been assigned from a previous assigner, by ingestion time. If the element
did not carry a timestamp before, this value is Long.MIN_VALUE.
extractTimestamp 在接口中 org.apache.flink.api.common.eventtime.TimestampAssigner<T>element - The element that the timestamp will be assigned to.elementPrevTimestamp - The previous internal timestamp of the element, or a negative value,
if no timestamp has been assigned yet.public final Watermark getCurrentWatermark()
AssignerWithPeriodicWatermarksnull to indicate that no new Watermark
is available.
The returned watermark will be emitted only if it is non-null and its timestamp is larger than that of the previously emitted watermark (to preserve the contract of ascending watermarks). If the current watermark is still identical to the previous one, no progress in event time has happened since the previous call to this method. If a null value is returned, or the timestamp of the returned watermark is smaller than that of the last emitted one, then no new watermark will be generated.
The interval in which this method is called and Watermarks are generated depends on ExecutionConfig.getAutoWatermarkInterval().
getCurrentWatermark 在接口中 AssignerWithPeriodicWatermarks<T>Null, if no watermark should be emitted, or the next watermark to emit.Watermark,
ExecutionConfig.getAutoWatermarkInterval()Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.