public ReducerTask(IReducerFactory reducer, MapReduceTask p) { this.reducerFactory = reducer; this.reducers = new HashVector(); this.parent = p; //initializing and synchronizing the queue this.reducerInputQueue = new Queue(); Queue synchronizedQueue = Queue.Synchronized(reducerInputQueue); this.reducerInputQueue = synchronizedQueue; }
public ReducerRecord( string name, string xmlName, IReducerFactory factory, ReducerView control ) { Name = name; XmlName = xmlName; Factory = factory; Control = control; }
public MapReduceTask(CacheBase parent, TaskCallback callback, IMapper mapper, ICombinerFactory combiner, IReducerFactory reducer, MapReduceInput inputProvider, MapReduceOutput outputProvider, Filter filter, CacheRuntimeContext context, int chunkSize, int maxExceps) { this._parent = parent; this.Callback = callback; this._context = context; this.maxExceptions = maxExceps; this.mapperTask = new MapperTask(mapper, inputProvider, filter != null ? filter.KeyFilter : null, this); if (reducer != null) { ReducerConfigured = true; this.reducerTask = new ReducerTask(reducer, this); } else { ReducerConfigured = true; this.reducerTask = new ReducerTask(new IdentityReducerFactory(), this); } if (combiner != null) { CombinerConfigured = true; this.combinerTask = new CombinerTask(combiner, this); } throttlingMgr = new MapReduceThrottlingManager(chunkSize, this); this.outputProvider = outputProvider; if (_parent != null && _parent is LocalCacheImpl) { isLocal = true; participants = new Hashtable(); participants.Add(new Address(_parent.Context.Render.IPAddress, _parent.Context.Render.Port), new NodeTaskStatus()); } #if !CLIENT if (_parent != null && _parent is ClusterCacheBase) { ArrayList list = ((ClusterCacheBase)_parent).ActiveServers; IEnumerator it = list.GetEnumerator(); participants = new Hashtable(); while (it.MoveNext()) { participants.Add(it.Current, new NodeTaskStatus()); } if (parent is PartitionedServerCache) { distributionMgr = ((PartitionedServerCache)parent).DistributionMgr; } } #endif //Queue itialization and synchronization Queue syncQueue = Queue.Synchronized(reducerDataQueue); this.reducerDataQueue = syncQueue; }
public MapReduceTask(IMapper mapper, ICombinerFactory combinerFactory, IReducerFactory reducerFactory) { this.Mapper = mapper; this.Combiner = combinerFactory; this.Reducer = reducerFactory; }