View Source Skitter.BIC.KeyedReduce (Skitter v0.5.3)
Keyed Reduce component.
This component implements a reduce operation. It accepts two arguments when embedded inside a workflow: a function and an initial state. When this component receives data, the function is called with the received data as its first argument and the current state as the second argument. The function should then return a new state to be used by the next data element.
The state of this componennt is grouped by key. The key that will be used is determined by a
previous element in the workflow, such as the Skitter.BIC.KeyBy
component. When no state is
present for the key, the initial state passed as an argument to the component will be passed as
the state.
Component Properties
- in ports:
_
- out ports:
_
- default strategy:
Skitter.BIS.KeyedState