
vectorpipe.sources.AugmentedDiffProvider.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vectorpipe_2.11 Show documentation
Show all versions of vectorpipe_2.11 Show documentation
Import OSM data and output to VectorTiles with GeoTrellis.
The newest version!
package vectorpipe.sources
import java.util.Optional
import org.apache.spark.sql.sources.DataSourceRegister
import org.apache.spark.sql.sources.v2.reader.DataSourceReader
import org.apache.spark.sql.sources.v2.reader.streaming.MicroBatchReader
import org.apache.spark.sql.sources.v2.{
DataSourceOptions,
DataSourceV2,
MicroBatchReadSupport,
ReadSupport
}
import org.apache.spark.sql.types.StructType
class AugmentedDiffProvider
extends DataSourceV2
with ReadSupport
with MicroBatchReadSupport
with DataSourceRegister {
override def createMicroBatchReader(
schema: Optional[StructType],
checkpointLocation: String,
options: DataSourceOptions
): MicroBatchReader = {
if (schema.isPresent) {
throw new IllegalStateException(
"The augmented diff source does not support a user-specified schema."
)
}
AugmentedDiffMicroBatchReader(options, checkpointLocation)
}
override def shortName(): String = Source.AugmentedDiffs
override def createReader(options: DataSourceOptions): DataSourceReader =
AugmentedDiffReader(options)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy