org.apache.accumulo.examples.wikisearch.iterator
Class EvaluatingIterator
java.lang.Object
org.apache.accumulo.examples.wikisearch.iterator.AbstractEvaluatingIterator
org.apache.accumulo.examples.wikisearch.iterator.EvaluatingIterator
- All Implemented Interfaces:
- OptionDescriber, SortedKeyValueIterator<Key,Value>
public class EvaluatingIterator
- extends AbstractEvaluatingIterator
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_BYTE_STRING
public static final String NULL_BYTE_STRING
- See Also:
- Constant Field Values
EvaluatingIterator
public EvaluatingIterator()
EvaluatingIterator
public EvaluatingIterator(AbstractEvaluatingIterator other,
IteratorEnvironment env)
deepCopy
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
getKeyComparator
public PartialKey getKeyComparator()
- Description copied from class:
AbstractEvaluatingIterator
- Implementations will return the PartialKey value to use for comparing keys for aggregating events
- Specified by:
getKeyComparator in class AbstractEvaluatingIterator
- Returns:
- the type of comparator to use
getReturnKey
public Key getReturnKey(Key k)
- Description copied from class:
AbstractEvaluatingIterator
- When the query expression evaluates to true against the event, the event fields will be serialized into the Value and returned up the iterator stack.
Implemenations will need to provide a key to be used with the event.
- Specified by:
getReturnKey in class AbstractEvaluatingIterator
- Returns:
- the key that should be returned with the map of values.
fillMap
public void fillMap(EventFields event,
Key key,
Value value)
- Description copied from class:
AbstractEvaluatingIterator
- Implementations will need to fill the map with field visibilities, names, and values. When all fields have been aggregated the event will be evaluated
against the query expression.
- Specified by:
fillMap in class AbstractEvaluatingIterator
- Parameters:
event - Multimap of event names and fields.key - current Keyvalue - current Value
getColumnVisibility
public ColumnVisibility getColumnVisibility(Key key)
- Parameters:
key -
- Returns:
isKeyAccepted
public boolean isKeyAccepted(Key key)
throws IOException
- Don't accept this key if the colf starts with 'fi'
- Specified by:
isKeyAccepted in class AbstractEvaluatingIterator
- Returns:
- true if the key should be acted upon, otherwise false.
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.