Click or drag to resize

AccumulatorTaskTKey, TValue Class

Base class for tasks that accumulate values associated with a specific key.
Inheritance Hierarchy
SystemObject
  Ookii.Jumbo.JetConfigurable
    Ookii.Jumbo.JetPushTaskPairTKey, TValue, PairTKey, TValue
      Ookii.Jumbo.Jet.TasksAccumulatorTaskTKey, TValue
        Ookii.Jumbo.Jet.TasksSumTaskTKey

Namespace: Ookii.Jumbo.Jet.Tasks
Assembly: Ookii.Jumbo.Jet (in Ookii.Jumbo.Jet.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public abstract class AccumulatorTask<TKey, TValue> : PushTask<Pair<TKey, TValue>, Pair<TKey, TValue>>
where TKey : Object, IComparable<TKey>

Type Parameters

TKey
The type of the keys.
TValue
The type of the values.

The AccumulatorTaskTKey, TValue type exposes the following members.

Constructors
 NameDescription
Protected methodAccumulatorTaskTKey, TValue Initializes a new instance of the AccumulatorTaskTKey, TValue class.
Top
Properties
 NameDescription
Public propertyDfsConfiguration Gets or sets the configuration used to access the Distributed File System.
(Inherited from Configurable)
Public propertyJetConfiguration Gets or sets the configuration used to access the Jet servers.
(Inherited from Configurable)
Public propertyTaskContext Gets or sets the configuration for the task attempt.
(Inherited from Configurable)
Top
Methods
 NameDescription
Protected methodAccumulate When implemented in a derived class, accumulates the values of the records.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodFinish Method called after the last record was processed.
(Overrides PushTaskTInput, TOutputFinish(RecordWriterTOutput))
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodNotifyConfigurationChanged Indicates the configuration has been changed. ApplyConfiguration(Object, DfsConfiguration, JetConfiguration, TaskContext) calls this method after setting the configuration.
(Overrides ConfigurableNotifyConfigurationChanged)
Public methodProcessRecord Method called for each record in the task's input.
(Overrides PushTaskTInput, TOutputProcessRecord(TInput, RecordWriterTOutput))
Public methodRun Runs the task.
(Inherited from PushTaskTInput, TOutput)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

It is safe to reuse the same PairTKey, TValue in every call to ProcessRecord(PairTKey, TValue, RecordWriterPairTKey, TValue) if the key and value are either value types or implement ICloneable. Therefore, if you specify the AllowRecordReuseAttribute on a class deriving from this class, the key and value must either be value types or implement ICloneable.

You can specify a custom key comparer using the AccumulatorTaskKeyComparerSettingKey key in the stage settings. Note that it is recommended to also use that has the comparer type for the HashPartitionerT in that case.

See Also