Package com.rpl.rama
Interface Agg
- All Superinterfaces:
AggOrCompoundAgg
- All Known Subinterfaces:
TopMonotonicAgg
Used for specifying aggregators in Rama topologies in conjunction with
agg or compoundAgg
methods- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Aggaccumulator(RamaAccumulatorAgg0 accumulator) Use a custom accumulator of zero arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg1 accumulator, Object arg0) Use a custom accumulator of one argument as an aggregator.static Aggaccumulator(RamaAccumulatorAgg2 accumulator, Object arg0, Object arg1) Use a custom accumulator of two arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg3 accumulator, Object arg0, Object arg1, Object arg2) Use a custom accumulator of three arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg4 accumulator, Object arg0, Object arg1, Object arg2, Object arg3) Use a custom accumulator of four arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg5 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) Use a custom accumulator of five arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg6 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) Use a custom accumulator of six arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg7 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) Use a custom accumulator of seven arguments as an aggregator.static Aggaccumulator(RamaAccumulatorAgg8 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) Use a custom accumulator of eight arguments as an aggregator.static AggApplies "and" operator to all input.static AggAverages input into a java.lang.Long.captureNewValInto(String var) Captures updated value of aggregated location into var for post-agg phase of a batch block.static Aggcombiner(RamaCombinerAgg combiner, Object arg) Use a custom combiner as an aggregatorstatic Aggcount()Counts input into a java.lang.Longstatic AggAggregates input to the first input seenstatic AggAggregates input to the last input seenstatic AggAggregates all input to a java.util.List data structure.static AggAggregates all input to a java.util.Map data structure.static AggComputes maximum value from inputstatic AggAggregates input java.util.Maps together into a single java.util.Map by adding all key/value pairs of each input.static AggComputes minimum value from inputstatic AggAggregates input values into a java.util.Map from value to countstatic AggApplies "or" operator to all input.static AggAggregates all input to a java.util.Set data structure.static AggAggregates to "void" value for the given java.util.Set element.static AggSums input values into a java.lang.Longstatic TopMonotonicAggtopMonotonic(int amt, String var) Aggregates input into a list of top elements.static Aggvoided()Aggregates to "void" value.
-
Method Details
-
captureNewValInto
Captures updated value of aggregated location into var for post-agg phase of a batch block. Used withcompoundAggand only usable in batch blocks in microbatch topologies.- Parameters:
var- Var to capture- See Also:
-
sum
Sums input values into a java.lang.Long- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
count
Counts input into a java.lang.Long- Returns:
- Builder-style object to add options
-
average
Averages input into a java.lang.Long. Cannot be used for aggregation into an existing PState.- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
max
Computes maximum value from input- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
min
Computes minimum value from input- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
or
Applies "or" operator to all input. Null or boolean false values are considered "false", and all other values are considered "true". If any input is "true", aggregates to first "true" value seen. If all inputs are "false", aggregates to last "false" value seen. If no input, aggregates to boolean false.- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
and
Applies "and" operator to all input. Null or false values are considered "false", and all other values are considered "true". If all inputs are "true", aggregates to last "true" value seen. If any input is "false", aggregates to first "false" value seen. If no input, aggregates to boolean true.- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
voided
Aggregates to "void" value. Used to remove nested elements from existing PStates. -
list
Aggregates all input to a java.util.List data structure.- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
set
Aggregates all input to a java.util.Set data structure.- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
map
Aggregates all input to a java.util.Map data structure.- Parameters:
argKey- Value or var input for the key of an entryargVal- Value or var input for the value of an entry- Returns:
- Builder-style object to add options
-
mergeMap
Aggregates input java.util.Maps together into a single java.util.Map by adding all key/value pairs of each input.- Parameters:
arg- Value or var input that must be a java.util.Map- Returns:
- Builder-style object to add options
-
setRemove
Aggregates to "void" value for the given java.util.Set element. Used to remove elements from Sets inside existing PStates. -
multiSet
Aggregates input values into a java.util.Map from value to count- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
last
Aggregates input to the last input seen- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
first
Aggregates input to the first input seen- Parameters:
arg- Value or var input- Returns:
- Builder-style object to add options
-
topMonotonic
Aggregates input into a list of top elements. See this documentation page for more information.- Parameters:
amt- Number of elements to computevar- Var input- Returns:
- Builder-style object to add sorting and other options
-
combiner
Use a custom combiner as an aggregator- Parameters:
combiner- Custom combiner implementationarg- Value or var input- Returns:
- Builder-style object to add options
-
accumulator
Use a custom accumulator of zero arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
Use a custom accumulator of one argument as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
Use a custom accumulator of two arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
Use a custom accumulator of three arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
static Agg accumulator(RamaAccumulatorAgg4 accumulator, Object arg0, Object arg1, Object arg2, Object arg3) Use a custom accumulator of four arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
static Agg accumulator(RamaAccumulatorAgg5 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) Use a custom accumulator of five arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
static Agg accumulator(RamaAccumulatorAgg6 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) Use a custom accumulator of six arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
static Agg accumulator(RamaAccumulatorAgg7 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) Use a custom accumulator of seven arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-
accumulator
static Agg accumulator(RamaAccumulatorAgg8 accumulator, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) Use a custom accumulator of eight arguments as an aggregator. Arguments can be values or vars.- Parameters:
accumulator- Custom accumulator implementation- Returns:
- Builder-style object to add options
-