Class MongoBatch
- java.lang.Object
-
- com.mongodb.spark.sql.connector.read.MongoBatch
-
-
Constructor Summary
Constructors Constructor Description MongoBatch(StructType schema, ReadConfig readConfig)
Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PartitionReaderFactory
createReaderFactory()
Returns a factory to create aPartitionReader
for eachInputPartition
.InputPartition[]
planInputPartitions()
Returns a list of partitions that split the collection into parts
-
-
-
Constructor Detail
-
MongoBatch
public MongoBatch(StructType schema, ReadConfig readConfig)
Construct a new instance- Parameters:
schema
- the schema for the datareadConfig
- the read configuration
-
-
Method Detail
-
planInputPartitions
public InputPartition[] planInputPartitions()
Returns a list of partitions that split the collection into parts- Specified by:
planInputPartitions
in interfaceBatch
-
createReaderFactory
public PartitionReaderFactory createReaderFactory()
Returns a factory to create aPartitionReader
for eachInputPartition
.- Specified by:
createReaderFactory
in interfaceBatch
-
-