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

Compare with Current View Page History

« Previous Version 14 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.

Public Interfaces

UsePreviousTimeOnInvalidTimeStamp will be deprecated if class name is changed.

public class UsePreviousTimeOnInvalidTimestamp extends ExtractRecordMetadataTimestamp {
...
}

Current method signature for onInvalidTimestamp


public long onInvalidTimestamp(final ConsumerRecord<Object, Object> record, final long recordTimestamp, final long partitionTime)

throws StreamsException {
...
}

Proposed Changes

Change 'UsePartitionTimeOnInvalidTimeStamp'  to 'UsePartitionTimeOnInvalidTimestamp'

public class UsePreviousTimeOnInvalidTimestamp extends ExtractRecordMetadataTimestamp {
...
}
public class UsePartitionTimeOnInvalidTimestamp extends ExtractRecordMetadataTimestamp {
...
}


Compatibility, Deprecation, and Migration Plan

UsePreviousTimeOnInvalidTimestamp won't be present instead 'UsePartitionOnInvalidTimeStamp' will be there in next major version without change in the functionality but it's clear from the name that this will be used for partition time. But we will deprecate UsePreviousTimeOnInvalidTimeStamp first and then introduce new one.

Rejected Alternatives

None.

  • No labels