T - Thy type of the records that is read.public class RecordReader<T extends org.apache.flink.core.io.IOReadableWritable> extends AbstractReader implements Reader<T>
inputGate| Constructor and Description |
|---|
RecordReader(InputGate inputGate,
Class<T> recordType,
String[] tmpDirectories)
Creates a new RecordReader that de-serializes records from the given input gate and
can spill partial records to disk, if they grow large.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearBuffers() |
protected boolean |
getNextRecord(T target) |
boolean |
hasNext() |
T |
next() |
handleEvent, hasReachedEndOfSuperstep, isFinished, publish, registerTaskEventListener, sendTaskEvent, setIterativeReader, startNextSuperstepclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasReachedEndOfSuperstep, isFinished, registerTaskEventListener, sendTaskEvent, setIterativeReader, startNextSupersteppublic RecordReader(InputGate inputGate, Class<T> recordType, String[] tmpDirectories)
inputGate - The input gate to read from.tmpDirectories - The temp directories. USed for spilling if the reader concurrently
reconstructs multiple large records.public boolean hasNext()
throws IOException,
InterruptedException
hasNext in interface Reader<T extends org.apache.flink.core.io.IOReadableWritable>IOExceptionInterruptedExceptionpublic T next() throws IOException, InterruptedException
next in interface Reader<T extends org.apache.flink.core.io.IOReadableWritable>IOExceptionInterruptedExceptionpublic void clearBuffers()
clearBuffers in interface Reader<T extends org.apache.flink.core.io.IOReadableWritable>protected boolean getNextRecord(T target)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.