Class AggregatorIterator
- java.lang.Object
-
- org.apache.accumulo.core.iterators.WrappingIterator
-
- org.apache.accumulo.core.iterators.Combiner
-
- uk.gov.gchq.gaffer.accumulostore.key.impl.AggregatorIterator
-
- All Implemented Interfaces:
org.apache.accumulo.core.iterators.OptionDescriber
,org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>
,org.apache.accumulo.core.iterators.YieldingKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>
public class AggregatorIterator extends org.apache.accumulo.core.iterators.Combiner
The aggregator iterator is used to combineValue
s where theKey
is the same (Except for the Timestamp column). The instructions provided in the schema define how the aggregation takes place and therefore what the resultingValue
will be.
-
-
Constructor Summary
Constructors Constructor Description AggregatorIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions
describeOptions()
void
init(org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value> source, Map<String,String> options, org.apache.accumulo.core.iterators.IteratorEnvironment env)
org.apache.accumulo.core.data.Value
reduce(org.apache.accumulo.core.data.Key key, Iterator<org.apache.accumulo.core.data.Value> iter)
boolean
validateOptions(Map<String,String> options)
-
Methods inherited from class org.apache.accumulo.core.iterators.Combiner
deepCopy, getTopKey, getTopValue, hasTop, next, seek, setColumns, setCombineAllColumns, setReduceOnFullCompactionOnly
-
-
-
-
Method Detail
-
reduce
public org.apache.accumulo.core.data.Value reduce(org.apache.accumulo.core.data.Key key, Iterator<org.apache.accumulo.core.data.Value> iter)
- Specified by:
reduce
in classorg.apache.accumulo.core.iterators.Combiner
-
init
public void init(org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value> source, Map<String,String> options, org.apache.accumulo.core.iterators.IteratorEnvironment env) throws IOException
- Specified by:
init
in interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>
- Overrides:
init
in classorg.apache.accumulo.core.iterators.Combiner
- Throws:
IOException
-
validateOptions
public boolean validateOptions(Map<String,String> options)
- Specified by:
validateOptions
in interfaceorg.apache.accumulo.core.iterators.OptionDescriber
- Overrides:
validateOptions
in classorg.apache.accumulo.core.iterators.Combiner
-
describeOptions
public org.apache.accumulo.core.iterators.OptionDescriber.IteratorOptions describeOptions()
- Specified by:
describeOptions
in interfaceorg.apache.accumulo.core.iterators.OptionDescriber
- Overrides:
describeOptions
in classorg.apache.accumulo.core.iterators.Combiner
-
-