org.apache.accumulo.core.iterators.user
Class BigDecimalCombiner

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<BigDecimal>
              extended by org.apache.accumulo.core.iterators.user.BigDecimalCombiner
All Implemented Interfaces:
OptionDescriber, SortedKeyValueIterator<Key,Value>
Direct Known Subclasses:
BigDecimalCombiner.BigDecimalMaxCombiner, BigDecimalCombiner.BigDecimalMinCombiner, BigDecimalCombiner.BigDecimalSummingCombiner

public abstract class BigDecimalCombiner
extends TypedValueCombiner<BigDecimal>

A family of combiners that treat values as BigDecimals, encoding and decoding using the built-in BigDecimal String input/output functions.


Nested Class Summary
static class BigDecimalCombiner.BigDecimalEncoder
          Provides the ability to encode scientific notation.
static class BigDecimalCombiner.BigDecimalMaxCombiner
           
static class BigDecimalCombiner.BigDecimalMinCombiner
           
static class BigDecimalCombiner.BigDecimalSummingCombiner
           
 
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
 
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
BigDecimalCombiner()
           
 
Method Summary
 OptionDescriber.IteratorOptions describeOptions()
          Gets an iterator options object that contains information needed to configure this iterator.
 void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env)
          Initializes the iterator.
 boolean validateOptions(Map<String,String> options)
          Check to see if an options map contains all options required by an iterator and that the option values are in the expected formats.
 
Methods inherited from class org.apache.accumulo.core.iterators.TypedValueCombiner
deepCopy, reduce, setEncoder, setEncoder, setLossyness, testEncoder, testEncoder, typedReduce
 
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
 

Constructor Detail

BigDecimalCombiner

public BigDecimalCombiner()
Method Detail

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<BigDecimal>
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.

describeOptions

public OptionDescriber.IteratorOptions describeOptions()
Description copied from interface: OptionDescriber
Gets an iterator options object that contains information needed to configure this iterator. This object will be used by the accumulo shell to prompt the user to input the appropriate information.

Specified by:
describeOptions in interface OptionDescriber
Overrides:
describeOptions in class TypedValueCombiner<BigDecimal>
Returns:
an iterator options object

validateOptions

public boolean validateOptions(Map<String,String> options)
Description copied from interface: OptionDescriber
Check to see if an options map contains all options required by an iterator and that the option values are in the expected formats.

Specified by:
validateOptions in interface OptionDescriber
Overrides:
validateOptions in class TypedValueCombiner<BigDecimal>
Parameters:
options - a map of option names to option values
Returns:
true if options are valid, false otherwise (IllegalArgumentException preferred)


Copyright © 2015 Apache Accumulo Project. All rights reserved.