KafkaOffsetReaderConsumer¶
KafkaOffsetReaderConsumer
is a KafkaOffsetReader.
KafkaOffsetReaderConsumer
is considered old and deprecated (in favour of the new Admin
-based KafkaOffsetReaderAdmin).
spark.sql.streaming.kafka.useDeprecatedOffsetFetching
spark.sql.streaming.kafka.useDeprecatedOffsetFetching configuration property controls what KafkaOffsetReader is used.
Creating Instance¶
KafkaOffsetReaderConsumer
takes the following to be created:
- ConsumerStrategy
- Driver Kafka Parameters
- Reader Options
- Driver GroupId Prefix
KafkaOffsetReaderConsumer
is created when:
KafkaOffsetReader
is requested to build a KafkaOffsetReader (with spark.sql.streaming.kafka.useDeprecatedOffsetFetching property enabled)
String Representation¶
toString(): String
toString
is part of the Object
(Java) abstraction.
toString
requests the ConsumerStrategy for the string representation.
Note
ConsumerStrategy does not overload toString
, but the implementations do (e.g., SubscribeStrategy).
toString
is used (among the other uses) when:
KafkaMicroBatchStream
is requested for the string representation