InputPartitionReader<T> createPartitionReader()
InputPartition Contract
InputPartition
is the abstraction of input partitions in Data Source API V2 that can create an InputPartitionReader and optionally specify preferred locations.
InputPartition
is also a Java Serializable.
InputPartition
is associated with DataSourceReader abstraction and its extension SupportsScanColumnarBatch.
InputPartition
is used for the following:
-
Creating DataSourceRDD, DataSourceRDDPartition,
ContinuousDataSourceRDD
andContinuousDataSourceRDDPartition
-
Requesting DataSourceV2ScanExec physical operator for the partitions or batchPartitions (of the input RDD)
Note
|
It appears that all concrete input partitions are used in Spark Structured Streaming only. |
Method | Description |
---|---|
|
Creates an InputPartitionReader Used when:
|
|
Specifies the preferred locations (executor hosts) Default: Used when:
|