public static class TimestampPolicyFactory.TimestampFnPolicy<K,V> extends TimestampPolicy<K,V>
TimestampPolicy.PartitionContext
Modifier and Type | Method and Description |
---|---|
Instant |
getTimestampForRecord(TimestampPolicy.PartitionContext context,
KafkaRecord<K,V> record)
Returns record timestamp (aka event time).
|
Instant |
getWatermark(TimestampPolicy.PartitionContext context)
Returns watermark for the partition.
|
public Instant getTimestampForRecord(TimestampPolicy.PartitionContext context, KafkaRecord<K,V> record)
TimestampPolicy
getTimestampForRecord
in class TimestampPolicy<K,V>
public Instant getWatermark(TimestampPolicy.PartitionContext context)
TimestampPolicy
UnboundedSource.UnboundedReader#getWatermark()
for more guidance on watermarks.
E.g. if the record timestamp is 'LogAppendTime', watermark would be the timestamp of the last
record since 'LogAppendTime' monotonically increases within a partition.getWatermark
in class TimestampPolicy<K,V>