org.apache.accumulo.examples.simple.combiner
public class StatsCombiner extends Combiner
Combiner
for more information on which values are combined together. See docs/examples/README.combiner for instructions.Combiner.ValueIterator
OptionDescriber.IteratorOptions
Modifier and Type | Field and Description |
---|---|
static String |
RADIX_OPTION |
ALL_OPTION, COLUMNS_OPTION
Constructor and Description |
---|
StatsCombiner() |
Modifier and Type | Method and Description |
---|---|
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.
|
Value |
reduce(Key key,
Iterator<Value> iter)
Reduces a list of Values into a single Value.
|
static void |
setRadix(IteratorSetting iterConfig,
int base)
A convenience method for setting the expected base/radix of the numbers
|
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.
|
deepCopy, getTopKey, getTopValue, hasTop, next, seek, setColumns, setCombineAllColumns
getSource, setSource
public static final String RADIX_OPTION
public Value reduce(Key key, Iterator<Value> iter)
Combiner
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException
SortedKeyValueIterator
init
in interface SortedKeyValueIterator<Key,Value>
init
in class Combiner
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.IOException
- unused.public OptionDescriber.IteratorOptions describeOptions()
OptionDescriber
describeOptions
in interface OptionDescriber
describeOptions
in class Combiner
public boolean validateOptions(Map<String,String> options)
OptionDescriber
validateOptions
in interface OptionDescriber
validateOptions
in class Combiner
options
- a map of option names to option valuespublic static void setRadix(IteratorSetting iterConfig, int base)
iterConfig
- Iterator settings to configurebase
- The expected base/radix of the numbers.Copyright © 2015 Apache Accumulo Project. All Rights Reserved.