T
- Type of the input tuples.U
- Type of the output tuples.K
- Type of the partition key.public class Aggregate<T,U,K> extends Pipe<T,U>
aggregator function
passing the list of tuples in the window and
the partition key. The returned value
is submitted to the sole output port
if it is not null
.Constructor and Description |
---|
Aggregate(Window<T,K,? extends java.util.List<T>> window,
BiFunction<java.util.List<T>,K,U> aggregator) |
Modifier and Type | Method and Description |
---|---|
void |
accept(T tuple)
Apply the function to
value . |
void |
close() |
void |
initialize(OpletContext<T,U> context)
Initialize the oplet.
|
getDestination, getInputs, start, submit
getOpletContext
public void initialize(OpletContext<T,U> context)
Oplet
initialize
in interface Oplet<T,U>
initialize
in class Pipe<T,U>
context
- the OpletContextpublic void accept(T tuple)
Consumer
value
.tuple
- Value function is applied to.public void close() throws java.lang.Exception
java.lang.Exception
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641