@InterfaceStability.Evolving public interface DataReaderFactory<T> extends java.io.Serializable
DataSourceReader.createDataReaderFactories()and is responsible for creating the actual data reader. The relationship between
DataReaderis similar to the relationship between
Iterator. Note that, the reader factory will be serialized and sent to executors, then the data reader will be created on executors and do the actual reading. So
DataReaderFactorymust be serializable and
DataReaderdoesn't need to be.
|Modifier and Type||Method and Description|
Returns a data reader to do the actual reading work.
The preferred locations where the data reader returned by this reader factory can run faster, but Spark does not guarantee to run the data reader on these locations.
default String preferredLocations()