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