Class SparkPubSubInputPartitionReader
java.lang.Object
com.linkedin.venice.spark.input.pubsub.SparkPubSubInputPartitionReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.spark.sql.connector.read.PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
public class SparkPubSubInputPartitionReader
extends Object
implements org.apache.spark.sql.connector.read.PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
A Spark SQL data source partition reader implementation for Venice PubSub messages.
This reader consumes messages from a specific partition of a PubSub topic between
specified start and end offsets, converting them into Spark's InternalRow
format.
The reader provides functionality for:
- Reading messages from a specific topic partition
- Filtering control messages when configured
- Tracking consumption progress
This class is part of the Venice Spark connector enabling ETL and KIF functionality.
-
Constructor Summary
ConstructorsConstructorDescriptionSparkPubSubInputPartitionReader
(SparkPubSubInputPartition inputPartition, PubSubConsumerAdapter consumer, String region, boolean useLogicalIndexOffset) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.spark.sql.connector.read.PartitionReader
currentMetricsValues
-
Constructor Details
-
SparkPubSubInputPartitionReader
public SparkPubSubInputPartitionReader(SparkPubSubInputPartition inputPartition, PubSubConsumerAdapter consumer, String region, boolean useLogicalIndexOffset)
-
-
Method Details
-
next
- Specified by:
next
in interfaceorg.apache.spark.sql.connector.read.PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
- Throws:
IOException
-
get
public org.apache.spark.sql.catalyst.InternalRow get()- Specified by:
get
in interfaceorg.apache.spark.sql.connector.read.PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
-
logProgressPercent
public float logProgressPercent() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-