public class ColumnFamilySkippingIterator extends SkippingIterator implements InterruptibleIterator
Modifier and Type | Field and Description |
---|---|
protected Set<ByteSequence> |
colFamSet |
protected boolean |
inclusive |
protected Range |
range |
protected TreeSet<ByteSequence> |
sortedColFams |
Modifier | Constructor and Description |
---|---|
|
ColumnFamilySkippingIterator(SortedKeyValueIterator<Key,Value> source) |
protected |
ColumnFamilySkippingIterator(SortedKeyValueIterator<Key,Value> source,
Set<ByteSequence> colFamSet,
boolean inclusive) |
Modifier and Type | Method and Description |
---|---|
protected void |
consume() |
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
Creates a deep copy of this iterator as though seek had not yet been called.
|
void |
seek(Range range,
Collection<ByteSequence> columnFamilies,
boolean inclusive)
Seeks to the first key in the Range, restricting the resulting K,V pairs to those with the specified columns.
|
void |
setInterruptFlag(AtomicBoolean flag) |
next
getSource, getTopKey, getTopValue, hasTop, init, setSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTopKey, getTopValue, hasTop, init, next
protected Set<ByteSequence> colFamSet
protected TreeSet<ByteSequence> sortedColFams
protected boolean inclusive
protected Range range
public ColumnFamilySkippingIterator(SortedKeyValueIterator<Key,Value> source)
protected ColumnFamilySkippingIterator(SortedKeyValueIterator<Key,Value> source, Set<ByteSequence> colFamSet, boolean inclusive)
protected void consume() throws IOException
consume
in class SkippingIterator
IOException
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
SortedKeyValueIterator
deepCopy
in interface SortedKeyValueIterator<Key,Value>
deepCopy
in class WrappingIterator
env
- IteratorEnvironment environment in which iterator is being run.public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException
SortedKeyValueIterator
SortedKeyValueIterator.init(org.apache.accumulo.core.iterators.SortedKeyValueIterator<K, V>, java.util.Map<java.lang.String, java.lang.String>, org.apache.accumulo.core.iterators.IteratorEnvironment)
is called.
Iterators that examine groups of adjacent key/value pairs (e.g. rows) to determine their top key and value should be sure that they properly handle a seek
to a key in the middle of such a group (e.g. the middle of a row). Even if the client always seeks to a range containing an entire group (a,c), the tablet
server could send back a batch of entries corresponding to (a,b], then reseek the iterator to range (b,c) when the scan is continued.seek
in interface SortedKeyValueIterator<Key,Value>
seek
in class SkippingIterator
range
- Range of keys to iterate over.columnFamilies
- Collection of column families to include or exclude.inclusive
- boolean that indicates whether to include (true) or exclude (false) column families.IOException
- if an I/O error occurs.public void setInterruptFlag(AtomicBoolean flag)
setInterruptFlag
in interface InterruptibleIterator
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.