Package org.aksw.commons.collector.core
Class AggInputSplit<I,E,K,J,O,SUBACC extends Accumulator<J,E,O>,SUBAGG extends ParallelAggregator<J,E,O,SUBACC>>
java.lang.Object
org.aksw.commons.collector.core.AggInputSplit<I,E,K,J,O,SUBACC,SUBAGG>
- Type Parameters:
I-K-O-SUBACC-SUBAGG-
- All Implemented Interfaces:
Serializable,Aggregator<I,,E, Map<K, O>> ParallelAggregator<I,E, Map<K, O>, AggInputSplit.AccInputSplit<I, E, K, J, O, SUBACC>>
public class AggInputSplit<I,E,K,J,O,SUBACC extends Accumulator<J,E,O>,SUBAGG extends ParallelAggregator<J,E,O,SUBACC>>
extends Object
implements ParallelAggregator<I,E,Map<K,O>,AggInputSplit.AccInputSplit<I,E,K,J,O,SUBACC>>, Serializable
An aggregator that splits the index into a set of keys and forwards the input to the sub-aggregator's accumulator
for each key.
- Author:
- raven
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclass -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanFor those keys a fresh sub accumulator will be allocated immediately upon callingcreateAccumulator()protected SUBAGGprotected BiFunction<? super I,? super K, ? extends J> -
Constructor Summary
ConstructorsConstructorDescriptionAggInputSplit(SUBAGG subAgg, Function<? super I, ? extends Set<? extends K>> keyMapper, BiFunction<? super I, ? super K, ? extends J> valueMapper) Create an instance with an empty set of fixedKeys and with addition of new keys allowedAggInputSplit(SUBAGG subAgg, Set<K> fixedKeys, boolean considerNewKeys, Function<? super I, ? extends Set<? extends K>> keyMapper, BiFunction<? super I, ? super K, ? extends J> valueMapper) -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.commons.collector.domain.Aggregator
accumulateAll, accumulateAll, accumulateAll, finishMethods inherited from interface org.aksw.commons.collector.domain.ParallelAggregator
asCollector, asCollector, combineRaw
-
Field Details
-
fixedKeys
For those keys a fresh sub accumulator will be allocated immediately upon callingcreateAccumulator() -
considerNewKeys
protected boolean considerNewKeys -
keyMapper
-
valueMapper
-
subAgg
-
-
Constructor Details
-
Method Details
-
createAccumulator
- Specified by:
createAccumulatorin interfaceAggregator<I,E, K> - Specified by:
createAccumulatorin interfaceParallelAggregator<I,E, K, J>
-
combine
public AggInputSplit.AccInputSplit<I,E, combineK, J, O, SUBACC> (AggInputSplit.AccInputSplit<I, E, K, J, O, SUBACC> a, AggInputSplit.AccInputSplit<I, E, K, J, O, SUBACC> b) Description copied from interface:ParallelAggregatorCombine accumulators. This method is allowed to mutate any of if its arguments, hence accumulators should be considered exhausted after combination. -
hashCode
public int hashCode() -
equals
-