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 KafkaTopicPartitionStateWithWatermarkGenerator<T,KPH> extends KafkaTopicPartitionState<T,KPH>
TimestampAssigner
, WatermarkGenerator
, an immediate WatermarkOutput
, and a
deferred WatermarkOutput
for this partition.
See WatermarkOutputMultiplexer
for an
explanation of immediate and deferred WatermarkOutputs.
.
Constructor and Description |
---|
KafkaTopicPartitionStateWithWatermarkGenerator(KafkaTopicPartition partition,
KPH kafkaPartitionHandle,
TimestampAssigner<T> timestampAssigner,
WatermarkGenerator<T> watermarkGenerator,
WatermarkOutput immediateOutput,
WatermarkOutput deferredOutput) |
Modifier and Type | Method and Description |
---|---|
long |
extractTimestamp(T record,
long kafkaEventTimestamp) |
void |
onEvent(T event,
long timestamp) |
void |
onPeriodicEmit() |
String |
toString() |
getCommittedOffset, getKafkaPartitionHandle, getKafkaTopicPartition, getOffset, getPartition, getTopic, isOffsetDefined, setCommittedOffset, setOffset
public KafkaTopicPartitionStateWithWatermarkGenerator(KafkaTopicPartition partition, KPH kafkaPartitionHandle, TimestampAssigner<T> timestampAssigner, WatermarkGenerator<T> watermarkGenerator, WatermarkOutput immediateOutput, WatermarkOutput deferredOutput)
public long extractTimestamp(T record, long kafkaEventTimestamp)
extractTimestamp
in class KafkaTopicPartitionState<T,KPH>
public void onEvent(T event, long timestamp)
onEvent
in class KafkaTopicPartitionState<T,KPH>
public void onPeriodicEmit()
onPeriodicEmit
in class KafkaTopicPartitionState<T,KPH>
public String toString()
toString
in class KafkaTopicPartitionState<T,KPH>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.