public class ConcatRecordReader<T> extends Object implements RecordReader<T>
RecordReader
s and read them sequentially. The
input list is already sorted by key and sequence number, and the key intervals do not overlap
each other.Modifier and Type | Class and Description |
---|---|
static interface |
ConcatRecordReader.ReaderSupplier<T>
Supplier to get
RecordReader . |
RecordReader.RecordIterator<T>
Modifier | Constructor and Description |
---|---|
protected |
ConcatRecordReader(List<ConcatRecordReader.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<ConcatRecordReader.ReaderSupplier<R>> readers) |
RecordReader.RecordIterator<T> |
readBatch()
Reads one batch.
|
protected ConcatRecordReader(List<ConcatRecordReader.ReaderSupplier<T>> readerFactories)
public static <R> RecordReader<R> create(List<ConcatRecordReader.ReaderSupplier<R>> readers) throws IOException
IOException
@Nullable public RecordReader.RecordIterator<T> readBatch() throws IOException
RecordReader
The 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>
IOException
public void close() throws IOException
RecordReader
close
in interface Closeable
close
in interface AutoCloseable
close
in interface RecordReader<T>
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.