Class TimestampPolicyFactory.ProcessingTimePolicy<K,​V>

  • Enclosing interface:
    TimestampPolicyFactory<KeyT,​ValueT>

    public static class TimestampPolicyFactory.ProcessingTimePolicy<K,​V>
    extends TimestampPolicy<K,​V>
    A simple policy that uses current time for event time and watermark. This should be used when better timestamps like LogAppendTime are not available for a topic.
    • Constructor Detail

      • ProcessingTimePolicy

        public ProcessingTimePolicy()
    • Method Detail

      • getWatermark

        public org.joda.time.Instant getWatermark​(TimestampPolicy.PartitionContext context)
        Description copied from class: TimestampPolicy
        Returns watermark for the partition. It is the timestamp before or at the timestamps of all future records consumed from the partition. See 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.
        Specified by:
        getWatermark in class TimestampPolicy<K,​V>