// Run the reducer directly. /// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> internal virtual void RunReducer <Keyin, Valuein, Keyout, Valueout>(TaskInputOutputContext <KEYIN, VALUEIN, KEYOUT, VALUEOUT> context) { RecordWriter <KEYOUT, VALUEOUT> rw = new Chain.ChainRecordWriter <KEYOUT, VALUEOUT> (context); Reducer.Context reducerContext = CreateReduceContext(rw, (ReduceContext)context, rConf); reducer.Run(reducerContext); rw.Close(context); }
/// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> internal virtual void RunMapper(TaskInputOutputContext context, int index) { Mapper mapper = mappers[index]; RecordReader rr = new Chain.ChainRecordReader(context); RecordWriter rw = new Chain.ChainRecordWriter(context); Mapper.Context mapperContext = CreateMapContext(rr, rw, context, GetConf(index)); mapper.Run(mapperContext); rr.Close(); rw.Close(context); }