public class ConcatRecordReader<T> extends Object implements RecordReader<T>
RecordReaders and read them sequentially. The
input list is already sorted by key and sequence number, and the key intervals do not overlap
each other.RecordReader.RecordIterator<T>| Modifier | Constructor and Description |
|---|---|
protected |
ConcatRecordReader(List<? extends ReaderSupplier<T>> readerFactories) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader and should release all resources.
|
static <R> RecordReader<R> |
create(List<? extends ReaderSupplier<R>> readers) |
static <R> RecordReader<R> |
create(ReaderSupplier<R> reader1,
ReaderSupplier<R> reader2) |
RecordReader.RecordIterator<T> |
readBatch()
Reads one batch.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilter, forEachRemaining, forEachRemainingWithPosition, toCloseableIterator, transformprotected ConcatRecordReader(List<? extends ReaderSupplier<T>> readerFactories)
public static <R> RecordReader<R> create(List<? extends ReaderSupplier<R>> readers) throws IOException
IOExceptionpublic static <R> RecordReader<R> create(ReaderSupplier<R> reader1, ReaderSupplier<R> reader2) throws IOException
IOException@Nullable public RecordReader.RecordIterator<T> readBatch() throws IOException
RecordReaderThe returned iterator object and any contained objects may be held onto by the source for some time, so it should not be immediately reused by the reader.
readBatch in interface RecordReader<T>IOExceptionpublic void close()
throws IOException
RecordReaderclose in interface Closeableclose in interface AutoCloseableclose in interface RecordReader<T>IOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.