@Internal public class CustomTimestampAssigner<T> extends Object implements SerializableTimestampAssigner<Tuple2<T,Long>>
NO_TIMESTAMP
Constructor and Description |
---|
CustomTimestampAssigner() |
Modifier and Type | Method and Description |
---|---|
long |
extractTimestamp(Tuple2<T,Long> element,
long recordTimestamp)
Assigns a timestamp to an element, in milliseconds since the Epoch.
|
public long extractTimestamp(Tuple2<T,Long> element, long recordTimestamp)
TimestampAssigner
The method is passed the previously assigned timestamp of the element. That previous
timestamp may have been assigned from a previous assigner. If the element did not carry a
timestamp before, this value is TimestampAssigner.NO_TIMESTAMP
(= Long.MIN_VALUE
: ).
extractTimestamp
in interface TimestampAssigner<Tuple2<T,Long>>
element
- The element that the timestamp will be assigned to.recordTimestamp
- The current internal timestamp of the element, or a negative value, if
no timestamp has been assigned yet.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.