org.apache.accumulo.examples.wikisearch.iterator
Class OptimizedQueryIterator

java.lang.Object
  extended by org.apache.accumulo.examples.wikisearch.iterator.OptimizedQueryIterator
All Implemented Interfaces:
OptionDescriber, SortedKeyValueIterator<Key,Value>

public class OptimizedQueryIterator
extends Object
implements SortedKeyValueIterator<Key,Value>, OptionDescriber

This iterator internally uses the BooleanLogicIterator to find event UIDs in the field index portion of the partition and uses the EvaluatingIterator to evaluate the events against an expression. The key and value that are emitted from this iterator are the key and value that come from the EvaluatingIterator.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.accumulo.core.iterators.OptionDescriber
OptionDescriber.IteratorOptions
 
Constructor Summary
OptimizedQueryIterator()
           
OptimizedQueryIterator(OptimizedQueryIterator other, IteratorEnvironment env)
           
 
Method Summary
 SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
           
 OptionDescriber.IteratorOptions describeOptions()
           
 Key getTopKey()
           
 Value getTopValue()
           
 boolean hasTop()
           
 void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env)
           
 void next()
           
 void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
           
 boolean validateOptions(Map<String,String> options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimizedQueryIterator

public OptimizedQueryIterator()

OptimizedQueryIterator

public OptimizedQueryIterator(OptimizedQueryIterator other,
                              IteratorEnvironment env)
Method Detail

describeOptions

public OptionDescriber.IteratorOptions describeOptions()
Specified by:
describeOptions in interface OptionDescriber

validateOptions

public boolean validateOptions(Map<String,String> options)
Specified by:
validateOptions in interface OptionDescriber

init

public void init(SortedKeyValueIterator<Key,Value> source,
                 Map<String,String> options,
                 IteratorEnvironment env)
          throws IOException
Specified by:
init in interface SortedKeyValueIterator<Key,Value>
Throws:
IOException

deepCopy

public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
Specified by:
deepCopy in interface SortedKeyValueIterator<Key,Value>

getTopKey

public Key getTopKey()
Specified by:
getTopKey in interface SortedKeyValueIterator<Key,Value>

getTopValue

public Value getTopValue()
Specified by:
getTopValue in interface SortedKeyValueIterator<Key,Value>

hasTop

public boolean hasTop()
Specified by:
hasTop in interface SortedKeyValueIterator<Key,Value>

next

public void next()
          throws IOException
Specified by:
next in interface SortedKeyValueIterator<Key,Value>
Throws:
IOException

seek

public void seek(Range range,
                 Collection<ByteSequence> columnFamilies,
                 boolean inclusive)
          throws IOException
Specified by:
seek in interface SortedKeyValueIterator<Key,Value>
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.