KPH
- The type of the Kafka partition descriptor, which varies across Kafka versions.@Internal public class KafkaTopicPartitionState<T,KPH> extends Object
This class describes the most basic state (only the offset), subclasses define more elaborate state, containing current watermarks and timestamp extractors.
Constructor and Description |
---|
KafkaTopicPartitionState(KafkaTopicPartition partition,
KPH kafkaPartitionHandle) |
Modifier and Type | Method and Description |
---|---|
long |
extractTimestamp(T record,
long kafkaEventTimestamp) |
long |
getCommittedOffset() |
KPH |
getKafkaPartitionHandle()
Gets Kafka's descriptor for the Kafka Partition.
|
KafkaTopicPartition |
getKafkaTopicPartition()
Gets Flink's descriptor for the Kafka Partition.
|
long |
getOffset()
The current offset in the partition.
|
int |
getPartition() |
String |
getTopic() |
boolean |
isOffsetDefined() |
void |
onEvent(T event,
long timestamp) |
void |
onPeriodicEmit() |
void |
setCommittedOffset(long offset) |
void |
setOffset(long offset) |
String |
toString() |
public KafkaTopicPartitionState(KafkaTopicPartition partition, KPH kafkaPartitionHandle)
public final KafkaTopicPartition getKafkaTopicPartition()
public final KPH getKafkaPartitionHandle()
public final String getTopic()
public final int getPartition()
public final long getOffset()
public final void setOffset(long offset)
public final boolean isOffsetDefined()
public final void setCommittedOffset(long offset)
public final long getCommittedOffset()
public long extractTimestamp(T record, long kafkaEventTimestamp)
public void onEvent(T event, long timestamp)
public void onPeriodicEmit()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.