PartitionReader¶
PartitionReader is an abstraction of partition readers (that PartitionReaderFactory creates for reading partitions in columnar or row-based fashion).
Generic Interface¶
PartitionReader is a generic interface with the following Java definition:
public interface PartitionReader<T>
PartitionReader uses T as the name of the type parameter.
Generic Types
Find out more on generic types in The Java Tutorials.
Contract¶
Next Record¶
T get()
Retrieves the current record
Used when:
DataSourceRDDis requested to compute a partitionFilePartitionReaderis requested togetthe current recordPartitionReaderWithPartitionValuesis requested togetthe current record
Proceeding to Next Record¶
boolean next()
Proceeds to next record if available (true) or false
Used when:
DataSourceRDDis requested to compute a partitionFilePartitionReaderis requested to proceed tonextrecord if availablePartitionReaderWithPartitionValuesis requested to proceed tonextrecord if available
Implementations¶
- EmptyPartitionReader
- FilePartitionReader
- PartitionedFileReader
- PartitionReaderFromIterator
- PartitionReaderWithPartitionValues
- PartitionRecordReader
- others