You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Status

Current state"Under Discussion"

Discussion thread: here

JIRA: KAFKA-8953

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Kafka Streams ships couple of different timestamp extractors, one named `UsePreviousTimeOnInvalidTimestamp`.

Given the latest improvements with regard to time tracking, it seems appropriate to rename this class to `UsePartitionTimeOnInvalidTimestamp`, as we now have fixed definition of partition time, and also passed partition time in extract method of class ExtractRecordMetadataTimestamp.

Public Interfaces

UsePreviousTimeOnInvalidTimeStamp will be deprecated if class name is changed.


Proposed Changes

Previously, in Kafka 2.3 we had the following methods inside 'UsePreviousTimeOnInvalidTimestamp' 

but now if we see the source code present at trunk, extract function has already been removed from 'UsePreviousTimeOnInvalidTimestamp', currently it implements onInvalidTimestamp which is abstract method of super class  ExtractRecordMetadataTimestamp and also the argument long previousTimestamp has been changed to long partitionTime

so it seems reasonable for us to change the class name to change as main functionality of this class is to return the record partition.

Also, there will be additional minor changes to be made if community agrees on the mentioned proposal which are listed below:

  • UsePreviousTimeOnInvalidTimestampTest
  • javadoc changes in ExtractRecordMetaDataTimeStamp.java, FailOnInvalidTimeStamp.java, LogAndSkipOnInvalidTimeStamp.java, WallClockTimeStampExtractor.java

Compatibility, Deprecation, and Migration Plan

UsePreviousTimeOnInvalidTimestamp won't be present instead 'UsePartitionOnInvalidTimeStamp' will be there in next version without change in the functionality but it's clear from the name that this will be used for partition time. But we will need to deprecate UsePreviousTimeOnInvalidTimeStamp


Rejected Alternatives

None.

  • No labels