Class RecordReader<T extends org.apache.flink.core.io.IOReadableWritable>
java.lang.Object
org.apache.flink.runtime.io.network.api.reader.AbstractReader
org.apache.flink.runtime.io.network.api.reader.RecordReader<T>
- Type Parameters:
T- Thy type of the records that is read.
- All Implemented Interfaces:
Reader<T>,ReaderBase
public class RecordReader<T extends org.apache.flink.core.io.IOReadableWritable>
extends AbstractReader
implements Reader<T>
Record oriented reader for immutable types.
-
Field Summary
Fields inherited from class org.apache.flink.runtime.io.network.api.reader.AbstractReader
inputGate -
Constructor Summary
ConstructorsConstructorDescriptionRecordReader(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected booleangetNextRecord(T target) booleanhasNext()next()Methods inherited from class org.apache.flink.runtime.io.network.api.reader.AbstractReader
handleEvent, hasReachedEndOfSuperstep, isFinished, publish, registerTaskEventListener, sendTaskEvent, setIterativeReader, startNextSuperstepMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.network.api.reader.ReaderBase
hasReachedEndOfSuperstep, isFinished, registerTaskEventListener, sendTaskEvent, setIterativeReader, startNextSuperstep
-
Constructor Details
-
RecordReader
Creates a new RecordReader that de-serializes records from the given input gate and can spill partial records to disk, if they grow large.- Parameters:
inputGate- The input gate to read from.tmpDirectories- The temp directories. USed for spilling if the reader concurrently reconstructs multiple large records.
-
-
Method Details
-
hasNext
- Specified by:
hasNextin interfaceReader<T extends org.apache.flink.core.io.IOReadableWritable>- Throws:
IOExceptionInterruptedException
-
next
- Specified by:
nextin interfaceReader<T extends org.apache.flink.core.io.IOReadableWritable>- Throws:
IOExceptionInterruptedException
-
clearBuffers
public void clearBuffers()- Specified by:
clearBuffersin interfaceReader<T extends org.apache.flink.core.io.IOReadableWritable>
-
getNextRecord
- Throws:
IOExceptionInterruptedException
-