Class KafkaTopicPartitionStateSentinel
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartitionStateSentinel
-
@Internal public class KafkaTopicPartitionStateSentinel extends Object
Magic values used to represent special offset states before partitions are actually read.The values are all negative. Negative offsets are not used by Kafka (invalid), so we pick a number that is probably (hopefully) not used by Kafka as a magic number for anything else.
-
-
Field Summary
Fields Modifier and Type Field Description static longEARLIEST_OFFSETMagic number that defines the partition should start from the earliest offset.static longGROUP_OFFSETMagic number that defines the partition should start from its committed group offset in Kafka.static longLATEST_OFFSETMagic number that defines the partition should start from the latest offset.static longOFFSET_NOT_SETMagic number that defines an unset offset.
-
Constructor Summary
Constructors Constructor Description KafkaTopicPartitionStateSentinel()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisSentinel(long offset)
-
-
-
Field Detail
-
OFFSET_NOT_SET
public static final long OFFSET_NOT_SET
Magic number that defines an unset offset.- See Also:
- Constant Field Values
-
EARLIEST_OFFSET
public static final long EARLIEST_OFFSET
Magic number that defines the partition should start from the earliest offset.This is used as a placeholder so that the actual earliest offset can be evaluated lazily when the partition will actually start to be read by the consumer.
- See Also:
- Constant Field Values
-
LATEST_OFFSET
public static final long LATEST_OFFSET
Magic number that defines the partition should start from the latest offset.This is used as a placeholder so that the actual latest offset can be evaluated lazily when the partition will actually start to be read by the consumer.
- See Also:
- Constant Field Values
-
GROUP_OFFSET
public static final long GROUP_OFFSET
Magic number that defines the partition should start from its committed group offset in Kafka.This is used as a placeholder so that the actual committed group offset can be evaluated lazily when the partition will actually start to be read by the consumer.
- See Also:
- Constant Field Values
-
-