Class WallclockTimestampExtractor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long extract​(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.Object,​java.lang.Object> record, long previousTimestamp)
      Return the current wall clock time as timestamp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WallclockTimestampExtractor

        public WallclockTimestampExtractor()
    • Method Detail

      • extract

        public long extract​(org.apache.kafka.clients.consumer.ConsumerRecord<java.lang.Object,​java.lang.Object> record,
                            long previousTimestamp)
        Return the current wall clock time as timestamp.
        Specified by:
        extract in interface TimestampExtractor
        Parameters:
        record - a data record
        previousTimestamp - the latest extracted valid timestamp of the current record's partition˙ (could be -1 if unknown)
        Returns:
        the current wall clock time, expressed in milliseconds since midnight, January 1, 1970 UTC