Defines the signature for a mapper class, which is used to perform the map step of a MapReduce operation.
A mapper ingests key-value pairs from the input named map and emits a number of
intermediate key-value pairs to be processed by a combiner or reducer.
Inheritance Hierarchy
Soss.Client.Concurrent.MapReduceMapperIK, IV, MK, MV
Namespace: Soss.Client.Concurrent.MapReduce
Assembly: soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Syntax
Type Parameters
- IK
- Input key type.
- IV
- Input value type.
- MK
- Map output (intermediate) key type.
- MV
- Map output (intermediate) value type.
The MapperIK, IV, MK, MV type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MapperIK, IV, MK, MV | Initializes a new instance of the MapperIK, IV, MK, MV class |
Properties
Name | Description | |
---|---|---|
KeyOutputSerializer |
Gets/sets CustomSerializerT for serializing and
deserializing the intermediate mapper's output keys. If CustomSerializerT
is not assigned, the default BinaryFormatter serializer will be used.
| |
ValueOutputSerializer |
Gets/sets the CustomSerializerT for serializing and
deserializing the intermediate mapper's output values. If CustomSerializerT
is not assigned, the default BinaryFormatter serializer will be used.
|
Methods
Name | Description | |
---|---|---|
Cleanup |
Performs optional cleanup operations after the
Map(IK, IV, IContextMK, MV) method is invoked.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Map |
Performs the map operation for a key-value pair.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Setup |
Performs optional setup operations before the
Map(IK, IV, IContextMK, MV) method is invoked.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Remarks
By default, the mapper class uses the BinaryFormatter serializer for emitted intermediate keys and values, but for the best performance you may want to consider overiding the KeyOutputSerializer and ValueOutputSerializer properties and use serializers with more compact output (for example, serializers that implement the Protocol Buffers or MessagePack serialization format).
See Also