Class YieldingIterator
- java.lang.Object
-
- org.apache.accumulo.core.iterators.WrappingIterator
-
- org.apache.accumulo.test.functional.YieldingIterator
-
- All Implemented Interfaces:
SortedKeyValueIterator<Key,Value>
,YieldingKeyValueIterator<Key,Value>
public class YieldingIterator extends WrappingIterator
This iterator which implements yielding will yield after every other next and every other seek call.
-
-
Constructor Summary
Constructors Constructor Description YieldingIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedKeyValueIterator<Key,Value>
deepCopy(IteratorEnvironment env)
void
enableYielding(YieldCallback<Key> yield)
Value
getTopValue()
The top value will encode the current state of the yields, seeks, and rebuilds for use by the YieldScannersIT tests.boolean
hasTop()
void
next()
protected void
resetCounters()
void
seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
-
Methods inherited from class org.apache.accumulo.core.iterators.WrappingIterator
getSource, getTopKey, init, setSource
-
-
-
-
Method Detail
-
deepCopy
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
- Specified by:
deepCopy
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
deepCopy
in classWrappingIterator
-
hasTop
public boolean hasTop()
- Specified by:
hasTop
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
hasTop
in classWrappingIterator
-
next
public void next() throws IOException
- Specified by:
next
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
next
in classWrappingIterator
- Throws:
IOException
-
getTopValue
public Value getTopValue()
The top value will encode the current state of the yields, seeks, and rebuilds for use by the YieldScannersIT tests.- Specified by:
getTopValue
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
getTopValue
in classWrappingIterator
- Returns:
- a top value of the form {yieldNexts},{yieldSeeks},{rebuilds}
-
seek
public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException
- Specified by:
seek
in interfaceSortedKeyValueIterator<Key,Value>
- Overrides:
seek
in classWrappingIterator
- Throws:
IOException
-
enableYielding
public void enableYielding(YieldCallback<Key> yield)
-
resetCounters
protected void resetCounters()
-
-