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)
- Description copied from interface:
SortedKeyValueIterator
- Creates a deep copy of this iterator as though seek had not yet been called. init should be called on an iterator before deepCopy is called. init should
not need to be called on the copy that is returned by deepCopy; that is, when necessary init should be called in the deepCopy method on the iterator it
returns. The behavior is unspecified if init is called after deepCopy either on the original or the copy.
- Parameters:
env
- IteratorEnvironment environment in which iterator is being run.
- Returns:
- SortedKeyValueIterator a copy of this iterator (with the same source and settings).
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.