Namespace Alachisoft.NCache.Runtime.MapReduce
Classes
KeyValuePair
Class representing key value pair structure.
MapReduceTask
Initialize Mapper, Reducer, Combiner
TaskStatus
Returns the status of running task.
Interfaces
ICombiner
Works as local reducer to the node where Mapper’s output has been combined to minimize traffic between Mapper and Reducer.
The tasks are processed and stored in bulk before being sent to the Reducer, meaning the data from Mapper is processed in chunks, the size of which is configurable. Once the combined results reach the specified chunk size, the elements are forwarded to the Reducer.
ICombinerFactory
Implement the interface ICombinerFactory and provide implementation for its Create(key) method. Providing Combiner Factory or Combiner is optional.
IKeyFilter
IkeyFilter allows the user to filter cache data based on its keys before being provided to the Mapper. The KeyFilter is called during Mapper’s execution. If it returns true, the Map will be executed on the key. If it returns false, Mapper will skip the key and move to next one from the Cache.
Note: If no filter is applied than the whole cache data will be mapped.
IMapper
MapReduce mapper interface processes input into key-value pairs to generate a set of intermediate key-value pairs to be sent for further refining and extraction of the data.
IOutputMap
The output is stored in-memory, on the server side. It can be enumerated using the TrackableTask instance on the client application.
IReducer
Processes all those intermediate key-value pairs generated by Mapper or combined by Combiner to aggregate, perform calculations or apply different operations to produce the reduced output.
IReducerFactory
Implement the interface IReducerFactory and provide implementation for its Create(key)method. Implementing IReducerFactory is optional.
ITaskResult
Returns the result of Map Reduce Task result from server.
ITrackableTask
This component lets you keep track of the progress of the task and its status as the task is executed. And lets you fetch the output of the task and enumerate it.
Note:MapReduceCallback() and GetResult() cannot be executed together because GetResult is a blocking call and this combination will throw an exception.
Enums
TaskCompletionStatus
Gives the status of the completed task.
TaskStatus.Status
Types of running task status.
Delegates
MapReduceCallback
Users can register a callback on the MapReduce task that is called when task execution is completed, failed or cancelled with a parameter response that encapsulates status of the task and result (if completed).