public class ThrottledUnfilteredIterator extends AbstractIterator<UnfilteredRowIterator> implements CloseableIterator<UnfilteredRowIterator>
throttle + 1 unfiltereds.
Only the first output contains partition level info: UnfilteredRowIterator.partitionLevelDeletion()
and BaseRowIterator.staticRow().
Besides splitting, this iterator will also ensure each chunk does not finish with an open tombstone marker,
by closing any opened tombstone markers and re-opening on the next chunk.
The lifecycle of outputed {UnfilteredRowIterator only last till next call to AbstractIterator.next().
A subsequent AbstractIterator.next call will exhaust the previously returned iterator before computing the next,
effectively skipping unfiltereds up to the throttle size.
Closing this iterator will close the underlying iterator.| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected UnfilteredRowIterator |
computeNext() |
static CloseableIterator<UnfilteredRowIterator> |
throttle(UnfilteredPartitionIterator partitionIterator,
int maxBatchSize)
Splits a
UnfilteredPartitionIterator in UnfilteredRowIterator batches with size no higher than
maxBatchSize |
endOfData, hasNext, next, peek, removeprotected UnfilteredRowIterator computeNext()
computeNext in class AbstractIterator<UnfilteredRowIterator>public void close()
close in interface java.lang.AutoCloseableclose in interface CloseableIterator<UnfilteredRowIterator>close in class AbstractIterator<UnfilteredRowIterator>public static CloseableIterator<UnfilteredRowIterator> throttle(UnfilteredPartitionIterator partitionIterator, int maxBatchSize)
UnfilteredPartitionIterator in UnfilteredRowIterator batches with size no higher than
maxBatchSizepartitionIterator - maxBatchSize - max number of unfiltereds in the UnfilteredRowIterator. if 0 is given, it means no throttle.Copyright © 2009-2022 The Apache Software Foundation