T- The elements that get timestamps assigned.
public class IngestionTimeExtractor<T> extends Object implements AssignerWithPeriodicWatermarks<T>
If this assigner is used after a stream source, it realizes "ingestion time" semantics.
|Constructor and Description|
|Modifier and Type||Method and Description|
Assigns a timestamp to an element, in milliseconds since the Epoch.
Returns the current watermark.
public long extractTimestamp(T element, long previousElementTimestamp)
The 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
element- The element that the timestamp is wil be assigned to.
previousElementTimestamp- The previous internal timestamp of the element, or a negative value, if no timestamp has been assigned, yet.
public Watermark getCurrentWatermark()
nullto 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
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.