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

java.lang.Object
  extended by org.apache.accumulo.core.iterators.WrappingIterator
      extended by org.apache.accumulo.core.iterators.Combiner
          extended by org.apache.accumulo.core.iterators.TypedValueCombiner<TermWeight.Info>
              extended by org.apache.accumulo.examples.wikisearch.iterator.TextIndexCombiner
All Implemented Interfaces:
OptionDescriber, SortedKeyValueIterator<Key,Value>

public class TextIndexCombiner
extends TypedValueCombiner<TermWeight.Info>


Nested Class Summary
static class TextIndexCombiner.TermWeightInfoEncoder
           
 
Nested classes/interfaces inherited from class org.apache.accumulo.core.iterators.TypedValueCombiner
TypedValueCombiner.Encoder<V>
 
Nested classes/interfaces inherited from class org.apache.accumulo.core.iterators.Combiner
Combiner.ValueIterator
 
Nested classes/interfaces inherited from interface org.apache.accumulo.core.iterators.OptionDescriber
OptionDescriber.IteratorOptions
 
Field Summary
static TypedValueCombiner.Encoder<TermWeight.Info> TERMWEIGHT_INFO_ENCODER
           
 
Fields inherited from class org.apache.accumulo.core.iterators.TypedValueCombiner
LOSSY
 
Fields inherited from class org.apache.accumulo.core.iterators.Combiner
ALL_OPTION, COLUMNS_OPTION
 
Constructor Summary
TextIndexCombiner()
           
 
Method Summary
 void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env)
          Initializes the iterator.
 TermWeight.Info typedReduce(Key key, Iterator<TermWeight.Info> iter)
          Reduces a list of V into a single V.
 
Methods inherited from class org.apache.accumulo.core.iterators.TypedValueCombiner
deepCopy, describeOptions, reduce, setEncoder, setEncoder, setLossyness, testEncoder, testEncoder, validateOptions
 
Methods inherited from class org.apache.accumulo.core.iterators.Combiner
getTopKey, getTopValue, hasTop, next, seek, setColumns, setCombineAllColumns
 
Methods inherited from class org.apache.accumulo.core.iterators.WrappingIterator
getSource, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TERMWEIGHT_INFO_ENCODER

public static final TypedValueCombiner.Encoder<TermWeight.Info> TERMWEIGHT_INFO_ENCODER
Constructor Detail

TextIndexCombiner

public TextIndexCombiner()
Method Detail

typedReduce

public TermWeight.Info typedReduce(Key key,
                                   Iterator<TermWeight.Info> iter)
Description copied from class: TypedValueCombiner
Reduces a list of V into a single V.

Specified by:
typedReduce in class TypedValueCombiner<TermWeight.Info>
Parameters:
key - The most recent version of the Key being reduced.
iter - An iterator over the V for different versions of the key.
Returns:
The combined V.

init

public void init(SortedKeyValueIterator<Key,Value> source,
                 Map<String,String> options,
                 IteratorEnvironment env)
          throws IOException
Description copied from interface: SortedKeyValueIterator
Initializes the iterator. Data should not be read from the source in this method.

Specified by:
init in interface SortedKeyValueIterator<Key,Value>
Overrides:
init in class TypedValueCombiner<TermWeight.Info>
Parameters:
source - SortedKeyValueIterator source to read data from.
options - Map map of string option names to option values.
env - IteratorEnvironment environment in which iterator is being run.
Throws:
IOException - unused.


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