Class IngestionTimeExtractor<T>
- java.lang.Object
-
- org.apache.flink.streaming.api.functions.IngestionTimeExtractor<T>
-
- Type Parameters:
T- The elements that get timestamps assigned.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.eventtime.TimestampAssigner<T>,org.apache.flink.api.common.functions.Function,AssignerWithPeriodicWatermarks<T>,TimestampAssigner<T>
@Deprecated public class IngestionTimeExtractor<T> extends Object implements AssignerWithPeriodicWatermarks<T>
Deprecated.A timestamp assigner that assigns timestamps based on the machine's wall clock.If this assigner is used after a stream source, it realizes "ingestion time" semantics.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IngestionTimeExtractor()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longextractTimestamp(T element, long previousElementTimestamp)Deprecated.Assigns a timestamp to an element, in milliseconds since the Epoch.WatermarkgetCurrentWatermark()Deprecated.Returns the current watermark.
-
-
-
Method Detail
-
extractTimestamp
public long extractTimestamp(T element, long previousElementTimestamp)
Deprecated.Description copied from interface:TimestampAssignerAssigns a timestamp to an element, in milliseconds since the Epoch.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
Long.MIN_VALUE.- Specified by:
extractTimestampin interfaceorg.apache.flink.api.common.eventtime.TimestampAssigner<T>- Specified by:
extractTimestampin interfaceTimestampAssigner<T>- Parameters:
element- The element that the timestamp will be assigned to.previousElementTimestamp- The previous internal timestamp of the element, or a negative value, if no timestamp has been assigned yet.- Returns:
- The new timestamp.
-
getCurrentWatermark
public Watermark getCurrentWatermark()
Deprecated.Description copied from interface:AssignerWithPeriodicWatermarksReturns the current watermark. This method is periodically called by the system to retrieve the current watermark. The method may returnnullto 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().- Specified by:
getCurrentWatermarkin interfaceAssignerWithPeriodicWatermarks<T>- Returns:
Null, if no watermark should be emitted, or the next watermark to emit.- See Also:
Watermark,ExecutionConfig.getAutoWatermarkInterval()
-
-