Expand description
Defines the accumulator trait and some common accumulators.
Structs§
- Max
- The state of a
Max
accumulator. - Min
- The state of a
Min
accumulator. - Reducer
Factory - A factory for
ErasedCommReducer
s. This is used to register aErasedCommReducer
type. We cannot registerErasedCommReducer
trait object directly because the object could have internal state, and cannot be shared. - Reducer
Spec - Serializable information needed to build a comm reducer.
- Watermark
Update - Update from ranks for watermark accumulator, where map’ key is the rank, and map’s value is the update from that rank.
Traits§
- Accumulator
- An accumulator is a object that accumulates updates into a state.
- Comm
Reducer - Commutative reducer for an accumulator. This is used to coallesce updates. For example, if the accumulator is a sum, its reducer calculates and returns the sum of 2 updates. This is helpful in split ports, where a large number of updates can be reduced into a smaller number of updates before being sent to the parent port.
- Erased
Comm Reducer - Type erased version of CommReducer.
Functions§
- low_
watermark - Accumulate the min value among the ranks, aka. low watermark, based on the ranks’ latest updates. Ranks’ previous updates are discarded, and not used in the min value calculation.
- max
- Accumulate the max of received updates (i.e. the largest value of all received updates).
- min
- Accumulate the min of received updates (i.e. the smallest value of all received updates).
- sum
- Accumulate the sum of received updates.