|Modifier and Type||Method and Description|
MicroBatchReader createMicroBatchReader(java.util.Optional<StructType> schema, String checkpointLocation, DataSourceOptions options)
MicroBatchReaderto read batches of data from this data source in a streaming query. The execution engine will create a micro-batch reader at the start of a streaming query, alternate calls to setOffsetRange and createDataReaderFactories for each batch to process, and then call stop() when the execution is complete. Note that a single query may have multiple executions due to restart or failure recovery.
schema- the user provided schema, or empty() if none was provided
checkpointLocation- a path to Hadoop FS scratch space that can be used for failure recovery. Readers for the same logical source in the same query will be given the same checkpointLocation.
options- the options for the returned data source reader, which is an immutable case-insensitive string-to-string map.