Modifier and Type | Method and Description |
---|---|
KafkaSourceBuilder<OUT> |
KafkaSourceBuilder.setBounded(OffsetsInitializer stoppingOffsetsInitializer)
By default the KafkaSource is set to run in
Boundedness.CONTINUOUS_UNBOUNDED manner
and thus never stops until the Flink job fails or is canceled. |
KafkaSourceBuilder<OUT> |
KafkaSourceBuilder.setStartingOffsets(OffsetsInitializer startingOffsetsInitializer)
Specify from which offsets the KafkaSource should start consume from by providing an
OffsetsInitializer . |
KafkaSourceBuilder<OUT> |
KafkaSourceBuilder.setUnbounded(OffsetsInitializer stoppingOffsetsInitializer)
By default the KafkaSource is set to run in
Boundedness.CONTINUOUS_UNBOUNDED manner
and thus never stops until the Flink job fails or is canceled. |
Constructor and Description |
---|
KafkaSourceEnumerator(KafkaSubscriber subscriber,
OffsetsInitializer startingOffsetInitializer,
OffsetsInitializer stoppingOffsetInitializer,
Properties properties,
SplitEnumeratorContext<KafkaPartitionSplit> context,
Boundedness boundedness) |
KafkaSourceEnumerator(KafkaSubscriber subscriber,
OffsetsInitializer startingOffsetInitializer,
OffsetsInitializer stoppingOffsetInitializer,
Properties properties,
SplitEnumeratorContext<KafkaPartitionSplit> context,
Boundedness boundedness,
Set<org.apache.kafka.common.TopicPartition> assignedPartitions) |
Modifier and Type | Class and Description |
---|---|
class |
NoStoppingOffsetsInitializer
An implementation of
OffsetsInitializer which does not initialize anything. |
Modifier and Type | Method and Description |
---|---|
static OffsetsInitializer |
OffsetsInitializer.committedOffsets()
Get an
OffsetsInitializer which initializes the offsets to the committed offsets. |
static OffsetsInitializer |
OffsetsInitializer.committedOffsets(org.apache.kafka.clients.consumer.OffsetResetStrategy offsetResetStrategy)
Get an
OffsetsInitializer which initializes the offsets to the committed offsets. |
static OffsetsInitializer |
OffsetsInitializer.earliest()
Get an
OffsetsInitializer which initializes the offsets to the earliest available
offsets of each partition. |
static OffsetsInitializer |
OffsetsInitializer.latest()
Get an
OffsetsInitializer which initializes the offsets to the latest offsets of each
partition. |
static OffsetsInitializer |
OffsetsInitializer.offsets(Map<org.apache.kafka.common.TopicPartition,Long> offsets)
Get an
OffsetsInitializer which initializes the offsets to the specified offsets. |
static OffsetsInitializer |
OffsetsInitializer.offsets(Map<org.apache.kafka.common.TopicPartition,Long> offsets,
org.apache.kafka.clients.consumer.OffsetResetStrategy offsetResetStrategy)
Get an
OffsetsInitializer which initializes the offsets to the specified offsets. |
static OffsetsInitializer |
OffsetsInitializer.timestamp(long timestamp)
Get an
OffsetsInitializer which initializes the offsets in each partition so that the
initialized offset is the offset of the first record whose record timestamp is greater than
or equals the give timestamp (milliseconds). |
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.