[This is preliminary documentation and is subject to change.]
Groups records using the supplied key selector, and applies the given aggregation function.
Namespace: Microsoft.Research.Naiad.Frameworks.Lindi
Assembly: Microsoft.Research.Naiad.Lindi (in Microsoft.Research.Naiad.Lindi.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
C#
public static Stream<Pair<TKey, TState>, TTime> Aggregate<TKey, TState, TTime>( this Stream<Pair<TKey, TState>, TTime> stream, Func<TState, TState, TState> combiner ) where TTime : Object, Time<TTime>
Parameters
- stream
- Type: Microsoft.Research.NaiadStreamPairTKey, TState, TTime
The input stream. - combiner
- Type: SystemFuncTState, TState, TState
A function from current state and incoming update, to the new state.
Type Parameters
- TKey
- The key type.
- TState
- The intermediate state type.
- TTime
- The type of timestamp on each record.
Return Value
Type: StreamPairTKey, TState, TTimeThe stream of one key-value pair for each key and the respective final combined state in the input stream.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type StreamPairTKey, TState, TTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).See Also