|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.iterators.IntersectingIterator
public class IntersectingIterator
Nested Class Summary | |
---|---|
protected static class |
IntersectingIterator.TermSource
|
Field Summary | |
---|---|
static java.lang.String |
columnFamiliesOptionName
|
protected boolean |
inclusive
|
protected static org.apache.log4j.Logger |
log
|
static java.lang.String |
notFlagOptionName
|
protected org.apache.hadoop.io.Text |
nullText
|
protected java.util.Collection<ByteSequence> |
seekColumnFamilies
|
Constructor Summary | |
---|---|
IntersectingIterator()
|
|
IntersectingIterator(IntersectingIterator other,
IteratorEnvironment env)
|
Method Summary | |
---|---|
void |
addSource(SortedKeyValueIterator<Key,Value> source,
IteratorEnvironment env,
org.apache.hadoop.io.Text term,
boolean notFlag)
|
protected void |
advanceToIntersection()
|
protected Key |
buildFollowingPartitionKey(Key key)
|
protected Key |
buildKey(org.apache.hadoop.io.Text partition,
org.apache.hadoop.io.Text term)
|
protected Key |
buildKey(org.apache.hadoop.io.Text partition,
org.apache.hadoop.io.Text term,
org.apache.hadoop.io.Text docID)
|
static boolean[] |
decodeBooleans(java.lang.String flags)
|
static org.apache.hadoop.io.Text[] |
decodeColumns(java.lang.String columns)
|
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
Creates a deep copy of this iterator as though seek had not yet been called. |
static java.lang.String |
encodeBooleans(boolean[] flags)
|
static java.lang.String |
encodeColumns(org.apache.hadoop.io.Text[] columns)
|
protected org.apache.hadoop.io.Text |
getDocID(Key key)
|
protected org.apache.hadoop.io.Text |
getPartition(Key key)
|
protected org.apache.hadoop.io.Text |
getTerm(Key key)
|
Key |
getTopKey()
Returns top key. |
Value |
getTopValue()
Returns top value. |
boolean |
hasTop()
Returns true if the iterator has more elements. |
void |
init(SortedKeyValueIterator<Key,Value> source,
java.util.Map<java.lang.String,java.lang.String> options,
IteratorEnvironment env)
Initializes the iterator. |
void |
next()
Advances to the next K,V pair. |
void |
seek(Range range,
java.util.Collection<ByteSequence> seekColumnFamilies,
boolean inclusive)
An iterator must seek to the first key in the range taking inclusiveness into account. |
static java.lang.String |
stringTopKey(SortedKeyValueIterator<Key,Value> iter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.hadoop.io.Text nullText
protected static final org.apache.log4j.Logger log
protected java.util.Collection<ByteSequence> seekColumnFamilies
protected boolean inclusive
public static final java.lang.String columnFamiliesOptionName
public static final java.lang.String notFlagOptionName
Constructor Detail |
---|
public IntersectingIterator()
public IntersectingIterator(IntersectingIterator other, IteratorEnvironment env)
Method Detail |
---|
protected org.apache.hadoop.io.Text getPartition(Key key)
protected org.apache.hadoop.io.Text getTerm(Key key)
protected org.apache.hadoop.io.Text getDocID(Key key)
protected Key buildKey(org.apache.hadoop.io.Text partition, org.apache.hadoop.io.Text term)
protected Key buildKey(org.apache.hadoop.io.Text partition, org.apache.hadoop.io.Text term, org.apache.hadoop.io.Text docID)
protected Key buildFollowingPartitionKey(Key key)
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
SortedKeyValueIterator
deepCopy
in interface SortedKeyValueIterator<Key,Value>
env
- IteratorEnvironment environment in which iterator is being run.
public Key getTopKey()
SortedKeyValueIterator
getTopKey
in interface SortedKeyValueIterator<Key,Value>
public Value getTopValue()
SortedKeyValueIterator
getTopValue
in interface SortedKeyValueIterator<Key,Value>
public boolean hasTop()
SortedKeyValueIterator
hasTop
in interface SortedKeyValueIterator<Key,Value>
public void next() throws java.io.IOException
SortedKeyValueIterator
next
in interface SortedKeyValueIterator<Key,Value>
java.io.IOException
- if an I/O error occurs.protected void advanceToIntersection() throws java.io.IOException
java.io.IOException
public static java.lang.String stringTopKey(SortedKeyValueIterator<Key,Value> iter)
public static java.lang.String encodeColumns(org.apache.hadoop.io.Text[] columns)
public static java.lang.String encodeBooleans(boolean[] flags)
public static org.apache.hadoop.io.Text[] decodeColumns(java.lang.String columns)
public static boolean[] decodeBooleans(java.lang.String flags)
public void init(SortedKeyValueIterator<Key,Value> source, java.util.Map<java.lang.String,java.lang.String> options, IteratorEnvironment env) throws java.io.IOException
SortedKeyValueIterator
init
in interface SortedKeyValueIterator<Key,Value>
source
- SortedKeyValueIterator source to read data from.options
- Map map of string option names to option values.env
- IteratorEnvironment environment in which iterator is being run.
java.io.IOException
- unused.public void seek(Range range, java.util.Collection<ByteSequence> seekColumnFamilies, boolean inclusive) throws java.io.IOException
SortedKeyValueIterator
seek
in interface SortedKeyValueIterator<Key,Value>
range
- Range of keys to iterate over.seekColumnFamilies
- Collection of column families to include or exclude.inclusive
- boolean that indicates whether to include (true) or exclude (false) column families.
java.io.IOException
- if an I/O error occurs.public void addSource(SortedKeyValueIterator<Key,Value> source, IteratorEnvironment env, org.apache.hadoop.io.Text term, boolean notFlag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |