Class ReusingBlockResettableIterator<T>
java.lang.Object
org.apache.flink.runtime.operators.resettable.NonReusingBlockResettableIterator<T>
org.apache.flink.runtime.operators.resettable.ReusingBlockResettableIterator<T>
- All Implemented Interfaces:
Iterator<T>,MemoryBlockIterator,ResettableIterator<T>
Implementation of an iterator that fetches a block of data into main memory and offers resettable
access to the data in that block.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final SimpleCollectingOutputViewprotected final ArrayList<org.apache.flink.core.memory.MemorySegment>protected final ArrayList<org.apache.flink.core.memory.MemorySegment>static final org.slf4j.Loggerprotected intprotected intprotected final RandomAccessInputViewprotected final org.apache.flink.api.common.typeutils.TypeSerializer<T>Fields inherited from class org.apache.flink.runtime.operators.resettable.NonReusingBlockResettableIterator
input, leftOverElement, nextElement, noMoreBlocks, readPhase -
Constructor Summary
ConstructorsConstructorDescriptionReusingBlockResettableIterator(MemoryManager memoryManager, Iterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, int numPages, AbstractInvokable ownerTask) ReusingBlockResettableIterator(MemoryManager memoryManager, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, int numPages, AbstractInvokable ownerTask) -
Method Summary
Modifier and TypeMethodDescriptionprotected Tprotected TgetNextRecord(T reuse) booleanhasNext()voidopen()protected booleanwriteNextRecord(T record) Methods inherited from class org.apache.flink.runtime.operators.resettable.NonReusingBlockResettableIterator
close, hasFurtherInput, next, nextBlock, remove, reopen, resetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
readView
-
collectingView
-
serializer
-
numRecordsInBuffer
protected int numRecordsInBuffer -
numRecordsReturned
protected int numRecordsReturned -
emptySegments
-
fullSegments
-
closed
protected volatile boolean closed
-
-
Constructor Details
-
ReusingBlockResettableIterator
public ReusingBlockResettableIterator(MemoryManager memoryManager, Iterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, int numPages, AbstractInvokable ownerTask) throws MemoryAllocationException - Throws:
MemoryAllocationException
-
ReusingBlockResettableIterator
public ReusingBlockResettableIterator(MemoryManager memoryManager, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, int numPages, AbstractInvokable ownerTask) throws MemoryAllocationException - Throws:
MemoryAllocationException
-
-
Method Details
-
hasNext
public boolean hasNext() -
open
public void open() -
writeNextRecord
- Throws:
IOException
-
getNextRecord
- Throws:
IOException
-
getNextRecord
- Throws:
IOException
-