|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.accumulo.examples.wikisearch.iterator.AndIterator
public class AndIterator
| Nested Class Summary | |
|---|---|
protected static class |
AndIterator.TermSource
Used in representing a Term that is intersected on. |
| Field Summary | |
|---|---|
static String |
columnFamiliesOptionName
|
protected byte[] |
emptyByteArray
|
protected static org.apache.log4j.Logger |
log
|
static String |
notFlagsOptionName
|
protected org.apache.hadoop.io.Text |
nullText
|
static String |
termValuesOptionName
|
protected Value |
value
|
| Constructor Summary | |
|---|---|
AndIterator()
Empty default constructor |
|
AndIterator(AndIterator other,
IteratorEnvironment env)
|
|
| Method Summary | |
|---|---|
void |
addSource(SortedKeyValueIterator<Key,Value> source,
IteratorEnvironment env,
org.apache.hadoop.io.Text term,
boolean notFlag)
|
void |
addSource(SortedKeyValueIterator<Key,Value> source,
IteratorEnvironment env,
org.apache.hadoop.io.Text dataLocation,
org.apache.hadoop.io.Text term,
boolean notFlag)
|
protected void |
advanceToIntersection()
|
protected Key |
buildFollowingPartitionKey(Key key)
Return the key that directly follows the given key |
protected Key |
buildKey(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text dataLocation)
Build a key from the given row and dataLocation |
protected Key |
buildKey(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text dataLocation,
org.apache.hadoop.io.Text term)
Build a key from the given row, dataLocation, and term |
static boolean[] |
decodeBooleans(String flags)
Decode the encoded NOT flags into a boolean array |
static org.apache.hadoop.io.Text[] |
decodeColumns(String columns)
Decode the encoded columns into a Text array |
static org.apache.hadoop.io.Text[] |
decodeTermValues(String terms)
Decode the encoded terms into a Text array |
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
|
static String |
encodeBooleans(boolean[] flags)
Encode an array of booleans denoted which columns are NOT'ed |
static String |
encodeColumns(org.apache.hadoop.io.Text[] columns)
Encode a Text array of all the columns to intersect on |
static String |
encodeTermValues(org.apache.hadoop.io.Text[] terms)
Encode a Text array of all of the terms to intersect on. |
protected org.apache.hadoop.io.Text |
getDataLocation(Key key)
Returns the given key's dataLocation |
protected org.apache.hadoop.io.Text |
getDocID(Key key)
Returns the given key's DocID |
protected org.apache.hadoop.io.Text |
getPartition(Key key)
|
protected org.apache.hadoop.io.Text |
getTerm(Key key)
Returns the given key's term |
Key |
getTopKey()
|
Value |
getTopValue()
|
protected String |
getUID(Key key)
Returns the given key's UID |
boolean |
hasTop()
|
void |
init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
|
boolean |
jump(Key jumpKey)
|
void |
next()
|
void |
seek(Range range,
Collection<ByteSequence> seekColumnFamilies,
boolean inclusive)
|
static 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 static final org.apache.log4j.Logger log
protected org.apache.hadoop.io.Text nullText
protected final byte[] emptyByteArray
protected Value value
public static final String columnFamiliesOptionName
public static final String termValuesOptionName
public static final String notFlagsOptionName
| Constructor Detail |
|---|
public AndIterator()
public AndIterator(AndIterator other,
IteratorEnvironment env)
| Method Detail |
|---|
protected org.apache.hadoop.io.Text getPartition(Key key)
protected org.apache.hadoop.io.Text getDataLocation(Key key)
key -
protected org.apache.hadoop.io.Text getTerm(Key key)
key -
protected org.apache.hadoop.io.Text getDocID(Key key)
key -
protected String getUID(Key key)
key -
protected Key buildKey(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text dataLocation)
row - The desired rowdataLocation - The desired dataLocation
protected Key buildKey(org.apache.hadoop.io.Text row,
org.apache.hadoop.io.Text dataLocation,
org.apache.hadoop.io.Text term)
row - The desired rowdataLocation - The desired dataLocationterm - The desired term
protected Key buildFollowingPartitionKey(Key key)
key - The key who will be directly before the returned key
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
deepCopy in interface SortedKeyValueIterator<Key,Value>public Key getTopKey()
getTopKey in interface SortedKeyValueIterator<Key,Value>public Value getTopValue()
getTopValue in interface SortedKeyValueIterator<Key,Value>public boolean hasTop()
hasTop in interface SortedKeyValueIterator<Key,Value>
public void next()
throws IOException
next in interface SortedKeyValueIterator<Key,Value>IOException
protected void advanceToIntersection()
throws IOException
IOExceptionpublic static String stringTopKey(SortedKeyValueIterator<Key,Value> iter)
public static String encodeColumns(org.apache.hadoop.io.Text[] columns)
Text array of all the columns to intersect on
columns - The columns to be encoded
public static String encodeTermValues(org.apache.hadoop.io.Text[] terms)
Text array of all of the terms to intersect on. The terms should match the columns in a one-to-one manner
terms - The terms to be encoded
public static String encodeBooleans(boolean[] flags)
booleans denoted which columns are NOT'ed
flags - The array of NOTs
public static org.apache.hadoop.io.Text[] decodeColumns(String columns)
Text array
columns - The Base64 encoded String of the columns
public static org.apache.hadoop.io.Text[] decodeTermValues(String terms)
Text array
terms - The Base64 encoded String of the terms
public static boolean[] decodeBooleans(String flags)
boolean array
flags -
public void init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
throws IOException
init in interface SortedKeyValueIterator<Key,Value>IOException
public void seek(Range range,
Collection<ByteSequence> seekColumnFamilies,
boolean inclusive)
throws IOException
seek in interface SortedKeyValueIterator<Key,Value>IOException
public void addSource(SortedKeyValueIterator<Key,Value> source,
IteratorEnvironment env,
org.apache.hadoop.io.Text term,
boolean notFlag)
public void addSource(SortedKeyValueIterator<Key,Value> source,
IteratorEnvironment env,
org.apache.hadoop.io.Text dataLocation,
org.apache.hadoop.io.Text term,
boolean notFlag)
public boolean jump(Key jumpKey)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||