public static interface OffsetsInitializer.PartitionOffsetsRetriever
OffsetsInitializer
to get the
initial offsets of the Kafka partitions.Modifier and Type | Method and Description |
---|---|
Map<org.apache.kafka.common.TopicPartition,Long> |
beginningOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
List beginning offsets for the specified partitions.
|
Map<org.apache.kafka.common.TopicPartition,Long> |
committedOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
The group id should be the set for
KafkaSource before invoking this
method. |
Map<org.apache.kafka.common.TopicPartition,Long> |
endOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
List end offsets for the specified partitions.
|
Map<org.apache.kafka.common.TopicPartition,org.apache.kafka.clients.consumer.OffsetAndTimestamp> |
offsetsForTimes(Map<org.apache.kafka.common.TopicPartition,Long> timestampsToSearch)
List offsets matching a timestamp for the specified partitions.
|
Map<org.apache.kafka.common.TopicPartition,Long> committedOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
KafkaSource
before invoking this
method. Otherwise an IllegalStateException
will be thrown.IllegalStateException
- if the group id is not set for the KafkaSource
.KafkaAdminClient.listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions)
Map<org.apache.kafka.common.TopicPartition,Long> endOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
Map<org.apache.kafka.common.TopicPartition,Long> beginningOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.