N - type of namespacepublic interface NamespaceAggsHandleFunction<N>
extends org.apache.flink.api.common.functions.Function
The differences between NamespaceAggsHandleFunction and AggsHandleFunction
is that the NamespaceAggsHandleFunction has namespace.
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate(BaseRow inputRow)
Accumulates the input values to the accumulators.
|
void |
cleanup(N namespace)
Cleanup for the retired accumulators state.
|
void |
close()
Tear-down method for this function.
|
BaseRow |
createAccumulators()
Initializes the accumulators and save them to a accumulators row.
|
BaseRow |
getAccumulators()
Gets the current accumulators (saved in a row) which contains the current
aggregated results.
|
BaseRow |
getValue(N namespace)
Gets the result of the aggregation from the current accumulators and
namespace properties (like window start).
|
void |
merge(N namespace,
BaseRow otherAcc)
Merges the other accumulators into current accumulators.
|
void |
open(StateDataViewStore store)
Initialization method for the function.
|
void |
retract(BaseRow inputRow)
Retracts the input values from the accumulators.
|
void |
setAccumulators(N namespace,
BaseRow accumulators)
Set the current accumulators (saved in a row) which contains the current
aggregated results.
|
void open(StateDataViewStore store) throws Exception
Exceptionvoid setAccumulators(N namespace, BaseRow accumulators) throws Exception
accumulators - current accumulatorsExceptionvoid accumulate(BaseRow inputRow) throws Exception
inputRow - input values bundled in a rowExceptionvoid retract(BaseRow inputRow) throws Exception
inputRow - input values bundled in a rowExceptionvoid merge(N namespace, BaseRow otherAcc) throws Exception
otherAcc - The other row of accumulatorsExceptionBaseRow createAccumulators() throws Exception
ExceptionBaseRow getAccumulators() throws Exception
ExceptionBaseRow getValue(N namespace) throws Exception
namespace - the namespace properties which should be calculated, such window startExceptionvoid cleanup(N namespace) throws Exception
ExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.