T
- The type of records handled by the watermark generatorKPH
- The type of the Kafka partition descriptor, which varies across Kafka versions@Internal public final class KafkaTopicPartitionStateWithPunctuatedWatermarks<T,KPH> extends KafkaTopicPartitionState<KPH>
This class is not thread safe, but it gives volatile access to the current
partition watermark (getCurrentPartitionWatermark()
).
Constructor and Description |
---|
KafkaTopicPartitionStateWithPunctuatedWatermarks(KafkaTopicPartition partition,
KPH kafkaPartitionHandle,
AssignerWithPunctuatedWatermarks<T> timestampsAndWatermarks) |
Modifier and Type | Method and Description |
---|---|
Watermark |
checkAndGetNewWatermark(T record,
long timestamp) |
long |
getCurrentPartitionWatermark() |
long |
getTimestampForRecord(T record,
long kafkaEventTimestamp) |
String |
toString() |
getCommittedOffset, getKafkaPartitionHandle, getKafkaTopicPartition, getOffset, getPartition, getTopic, isOffsetDefined, setCommittedOffset, setOffset
public KafkaTopicPartitionStateWithPunctuatedWatermarks(KafkaTopicPartition partition, KPH kafkaPartitionHandle, AssignerWithPunctuatedWatermarks<T> timestampsAndWatermarks)
public long getTimestampForRecord(T record, long kafkaEventTimestamp)
@Nullable public Watermark checkAndGetNewWatermark(T record, long timestamp)
public long getCurrentPartitionWatermark()
public String toString()
toString
in class KafkaTopicPartitionState<KPH>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.