Click or drag to resize

JobBuilderGroupAggregateTKey, TValue(IOperationInput, FuncTKey, TValue, TValue, TValue, Type, RecordReuseMode) Method

Groups the input records by key, then aggregates their values using the specified accumulator task function.

Namespace: Ookii.Jumbo.Jet.Jobs.Builder
Assembly: Ookii.Jumbo.Jet (in Ookii.Jumbo.Jet.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public TwoStepOperation GroupAggregate<TKey, TValue>(
	IOperationInput input,
	Func<TKey, TValue, TValue, TValue> accumulator,
	Type? keyComparerType = null,
	RecordReuseMode recordReuse = RecordReuseMode.Default
)
where TKey : Object, IComparable<TKey>

Parameters

input  IOperationInput
The input.
accumulator  FuncTKey, TValue, TValue, TValue
The accumulator function to use to create the task.
keyComparerType  Type  (Optional)
Type of the IEqualityComparerT to use to compare the aggregation keys, or to use Default. May be a generic type definition with one type parameter, which will be set to the key type.
recordReuse  RecordReuseMode  (Optional)
The record reuse mode.

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

Return Value

TwoStepOperation
A TwoStepOperation instance that can be used to further customize the operation.
Remarks

This method generates a class implementing AccumulatorTaskTKey, TValue which calls the target method of the accumulator delegate from the Accumulate(TKey, TValue, TValue) method.

Note  Note
The task method will be called from a completely different process than the one that is using JobBuilder, so it should not really on any external state.

If recordReuse is Default and the target method has the AllowRecordReuseAttribute attribute applied to it, that attribute will be copied to the task class. If the target method has the ProcessAllInputPartitionsAttribute attribute applied to it, that attribute will be copied to the task class.

The target method must be a public static method.

See Also