KafkaSourceOffset¶
KafkaSourceOffset
is an Offset in Kafka Data Source.
Creating Instance¶
KafkaSourceOffset
takes the following to be created:
- Offsets by Partitions (
Map[TopicPartition, Long]
)
KafkaSourceOffset
is created when:
KafkaContinuousStream
is requested for the initial offset, deserializeOffset, mergeOffsetsKafkaMicroBatchStream
is requested for the initial offset, reportLatestOffset, latestOffset, deserializeOffset, getOrCreateInitialPartitionOffsetsKafkaOffsetReaderAdmin
is requested to fetchSpecificOffsets0KafkaOffsetReaderConsumer
is requested to fetchSpecificOffsets0KafkaSource
is requested for the initialPartitionOffsets, reportLatestOffset, latestOffsetKafkaSourceOffset
utility is used to create a KafkaSourceOffset
Creating KafkaSourceOffset Instance¶
apply(
offsetTuples: (String, Int, Long)*): KafkaSourceOffset
apply(
offset: SerializedOffset): KafkaSourceOffset
apply(
offset: Offset): KafkaSourceOffset
apply
creates a KafkaSourceOffset.
apply
is used when:
KafkaMicroBatchStream
is requested for the performance metricsKafkaSourceInitialOffsetWriter
is requested to deserialize a KafkaSourceOffsetKafkaSourceOffset
is requested for the partition offsets
Partition Offsets¶
getPartitionOffsets(
offset: Offset): Map[TopicPartition, Long]
getPartitionOffsets
requests the given KafkaSourceOffset or SerializedOffset
(from the given Offset) for the partitionToOffsets.
getPartitionOffsets
is used when:
KafkaSource
is requested to getBatch