Class SpillingResettableMutableObjectIterator<T>
java.lang.Object
org.apache.flink.runtime.operators.resettable.SpillingResettableMutableObjectIterator<T>
- Type Parameters:
T- The type of record that the iterator handles.
- All Implemented Interfaces:
ResettableMutableObjectIterator<T>,org.apache.flink.util.MutableObjectIterator<T>
public class SpillingResettableMutableObjectIterator<T>
extends Object
implements ResettableMutableObjectIterator<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 final org.apache.flink.util.MutableObjectIterator<T>protected org.apache.flink.core.memory.DataInputViewprotected final MemoryManagerprotected final org.apache.flink.api.common.typeutils.TypeSerializer<T> -
Constructor Summary
ConstructorsConstructorDescriptionSpillingResettableMutableObjectIterator(org.apache.flink.util.MutableObjectIterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, int numPages, AbstractInvokable parentTask) SpillingResettableMutableObjectIterator(org.apache.flink.util.MutableObjectIterator<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
-
Field Details
-
inView
protected org.apache.flink.core.memory.DataInputView inView -
serializer
-
buffer
-
input
-
memoryManager
-
-
Constructor Details
-
SpillingResettableMutableObjectIterator
public SpillingResettableMutableObjectIterator(org.apache.flink.util.MutableObjectIterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, int numPages, AbstractInvokable parentTask) throws MemoryAllocationException - Throws:
MemoryAllocationException
-
SpillingResettableMutableObjectIterator
public SpillingResettableMutableObjectIterator(org.apache.flink.util.MutableObjectIterator<T> input, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer, MemoryManager memoryManager, IOManager ioManager, List<org.apache.flink.core.memory.MemorySegment> memory)
-
-
Method Details
-
open
public void open() -
reset
Description copied from interface:ResettableMutableObjectIteratorResets the iterator.- Specified by:
resetin interfaceResettableMutableObjectIterator<T>- Throws:
IOException- May be thrown when the serialization into buffers or the spilling to secondary storage fails.
-
close
- Throws:
IOException
-
next
- Specified by:
nextin interfaceorg.apache.flink.util.MutableObjectIterator<T>- Throws:
IOException
-
next
- Specified by:
nextin interfaceorg.apache.flink.util.MutableObjectIterator<T>- Throws:
IOException
-
consumeAndCacheRemainingData
- Throws:
IOException
-