@Internal public class NoStoppingOffsetsInitializer extends Object implements OffsetsInitializer
OffsetsInitializer which does not initialize anything.
This class is used as the default stopping offsets initializer for unbounded Kafka sources.
OffsetsInitializer.PartitionOffsetsRetriever| 构造器和说明 |
|---|
NoStoppingOffsetsInitializer() |
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.kafka.clients.consumer.OffsetResetStrategy |
getAutoOffsetResetStrategy()
Get the auto offset reset strategy in case the initialized offsets falls out of the range.
|
Map<org.apache.kafka.common.TopicPartition,Long> |
getPartitionOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions,
OffsetsInitializer.PartitionOffsetsRetriever partitionOffsetsRetriever)
Get the initial offsets for the given Kafka partitions.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommittedOffsets, committedOffsets, earliest, latest, offsets, offsets, timestamppublic Map<org.apache.kafka.common.TopicPartition,Long> getPartitionOffsets(Collection<org.apache.kafka.common.TopicPartition> partitions, OffsetsInitializer.PartitionOffsetsRetriever partitionOffsetsRetriever)
OffsetsInitializerIf the implementation returns a starting offset which causes OffsetsOutOfRangeException from Kafka. The OffsetResetStrategy provided by the
OffsetsInitializer.getAutoOffsetResetStrategy() will be used to reset the offset.
getPartitionOffsets 在接口中 OffsetsInitializerpartitions - the Kafka partitions to get the starting offsets.partitionOffsetsRetriever - a helper to retrieve information of the Kafka partitions.public org.apache.kafka.clients.consumer.OffsetResetStrategy getAutoOffsetResetStrategy()
OffsetsInitializerThe OffsetStrategy is only used when the offset initializer is used to initialize the starting offsets and the starting offsets is out of range.
getAutoOffsetResetStrategy 在接口中 OffsetsInitializerOffsetResetStrategy to use if the initialized offsets are out of the
range.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.