Class IterableRecordReader<P>

  • Type Parameters:
    P - type of the record's payload
    All Implemented Interfaces:
    RecordReader<P>

    public class IterableRecordReader<P>
    extends java.lang.Object
    implements RecordReader<P>
    Reads record from an Iterable data source. This reader produces GenericRecord instances containing original objects from the data source.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Constructor Detail

      • IterableRecordReader

        public IterableRecordReader​(java.lang.Iterable<P> dataSource)
        Create a new IterableRecordReader.
        Parameters:
        dataSource - to read records from.
    • Method Detail

      • readRecord

        public GenericRecord<P> readRecord()
        Description copied from interface: RecordReader
        Read next record from the data source.
        Specified by:
        readRecord in interface RecordReader<P>
        Returns:
        the next record from the data source or null if the end of the data source is reached