Class MongoStreamPartitionReader

    • Constructor Detail

      • MongoStreamPartitionReader

        public MongoStreamPartitionReader​(MongoInputPartition partition,
                                          BsonDocumentToRowConverter bsonDocumentToRowConverter,
                                          ReadConfig readConfig)
        Construct a new instance
        Parameters:
        partition - the partition
        bsonDocumentToRowConverter - the converter from BsonDocument to InternalRow
        readConfig - the read configuration for reading from the partition
    • Method Detail

      • next

        public boolean next()
        Specified by:
        next in interface PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
      • get

        public org.apache.spark.sql.catalyst.InternalRow get()
        Specified by:
        get in interface PartitionReader<org.apache.spark.sql.catalyst.InternalRow>
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable