|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.accumulo.core.iterators.WrappingIterator
org.apache.accumulo.examples.wikisearch.iterator.FieldIndexIterator
public class FieldIndexIterator
This iterator should only return keys from the fi\0{fieldName}:{fieldValue} part of the shard table. Expect topKey to be CF, {datatype}\0{UID}
Field Summary | |
---|---|
protected static org.apache.log4j.Logger |
log
|
Constructor Summary | |
---|---|
FieldIndexIterator()
|
|
FieldIndexIterator(FieldIndexIterator other,
IteratorEnvironment env)
|
|
FieldIndexIterator(int type,
org.apache.hadoop.io.Text rowId,
org.apache.hadoop.io.Text fieldName,
org.apache.hadoop.io.Text fieldValue,
boolean neg,
String operator)
|
|
FieldIndexIterator(int type,
org.apache.hadoop.io.Text rowId,
org.apache.hadoop.io.Text fieldName,
org.apache.hadoop.io.Text fieldValue,
String operator)
|
Method Summary | |
---|---|
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
Creates a deep copy of this iterator as though seek had not yet been called. |
org.apache.hadoop.io.Text |
getCurrentRow()
|
org.apache.hadoop.io.Text |
getfName()
|
org.apache.hadoop.io.Text |
getfValue()
|
Key |
getTopKey()
Returns top key. |
Value |
getTopValue()
Returns top value. |
boolean |
hasTop()
Returns true if the iterator has more elements. |
boolean |
isNegated()
|
boolean |
jump(Key jumpKey)
|
void |
next()
Advances to the next K,V pair. |
void |
seek(Range r,
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. |
static void |
setLogLevel(org.apache.log4j.Level l)
|
Methods inherited from class org.apache.accumulo.core.iterators.WrappingIterator |
---|
getSource, init, setSource |
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
Constructor Detail |
---|
public FieldIndexIterator()
public FieldIndexIterator(int type, org.apache.hadoop.io.Text rowId, org.apache.hadoop.io.Text fieldName, org.apache.hadoop.io.Text fieldValue, String operator)
public FieldIndexIterator(int type, org.apache.hadoop.io.Text rowId, org.apache.hadoop.io.Text fieldName, org.apache.hadoop.io.Text fieldValue, boolean neg, String operator)
public FieldIndexIterator(FieldIndexIterator other, IteratorEnvironment env)
Method Detail |
---|
public static void setLogLevel(org.apache.log4j.Level l)
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 Key getTopKey()
SortedKeyValueIterator
getTopKey
in interface SortedKeyValueIterator<Key,Value>
getTopKey
in class WrappingIterator
public Value getTopValue()
SortedKeyValueIterator
getTopValue
in interface SortedKeyValueIterator<Key,Value>
getTopValue
in class WrappingIterator
public boolean hasTop()
SortedKeyValueIterator
hasTop
in interface SortedKeyValueIterator<Key,Value>
hasTop
in class WrappingIterator
public void next() throws IOException
SortedKeyValueIterator
next
in interface SortedKeyValueIterator<Key,Value>
next
in class WrappingIterator
IOException
- if an I/O error occurs.public void seek(Range r, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException
SortedKeyValueIterator
SortedKeyValueIterator.init(org.apache.accumulo.core.iterators.SortedKeyValueIterator, java.util.Map, 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 WrappingIterator
r
- 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 boolean isNegated()
public org.apache.hadoop.io.Text getCurrentRow()
public org.apache.hadoop.io.Text getfName()
public org.apache.hadoop.io.Text getfValue()
public boolean jump(Key jumpKey) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |