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>
public class SpillingResettableIterator<T> extends Object implements 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
Fields Modifier and Type Field Description protected SpillingBufferbufferprotected Iterator<T>inputprotected org.apache.flink.core.memory.DataInputViewinViewprotected MemoryManagermemoryManagerprotected org.apache.flink.api.common.typeutils.TypeSerializer<T>serializer
-
Constructor Summary
Constructors Constructor Description SpillingResettableIterator(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.flink.core.memory.MemorySegment>close()booleanhasNext()Tnext()voidopen()voidremove()voidreset()Resets the iterator.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
inView
protected org.apache.flink.core.memory.DataInputView inView
-
serializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer
-
buffer
protected final SpillingBuffer buffer
-
memoryManager
protected final MemoryManager memoryManager
-
-
Constructor Detail
-
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
-
-
Method Detail
-
open
public void open()
-
reset
public void reset() throws IOExceptionDescription copied from interface:ResettableIteratorResets the iterator.- Specified by:
resetin interfaceResettableIterator<T>- Throws:
IOException
-
close
public List<org.apache.flink.core.memory.MemorySegment> close() throws IOException
- Throws:
IOException
-
-