Class SpillingResettableIterator<T>
java.lang.Object
org.apache.flink.runtime.operators.resettable.SpillingResettableIterator<T>
- Type Parameters:
T- The type of record that the iterator handles.
- All Implemented Interfaces:
Iterator<T>,ResettableIterator<T>
Implementation of a resettable iterator. While iterating the first time over the data, the
iterator writes the records to a spillable buffer. Any subsequent iteration re-reads the data
from that buffer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SpillingBufferprotected org.apache.flink.core.memory.DataInputViewprotected final MemoryManagerprotected final org.apache.flink.api.common.typeutils.TypeSerializer<T> -
Constructor Summary
ConstructorsConstructorDescriptionSpillingResettableIterator(Iterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, int numPages, AbstractInvokable parentTask) SpillingResettableIterator(Iterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, List<org.apache.flink.core.memory.MemorySegment> memory) -
Method Summary
Methods 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
-
inView
protected org.apache.flink.core.memory.DataInputView inView -
serializer
-
buffer
-
input
-
memoryManager
-
-
Constructor Details
-
SpillingResettableIterator
public SpillingResettableIterator(Iterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, int numPages, AbstractInvokable parentTask) throws MemoryAllocationException - Throws:
MemoryAllocationException
-
SpillingResettableIterator
-
-
Method Details
-
open
public void open() -
reset
Description copied from interface:ResettableIteratorResets the iterator.- Specified by:
resetin interfaceResettableIterator<T>- Throws:
IOException
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
close
- Throws:
IOException
-