/// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> protected internal override void Setup(Reducer.Context context) { Configuration conf = context.GetConfiguration(); this.fieldSeparator = conf.Get(FieldSelectionHelper.DataFieldSeperator, "\t"); this.reduceOutputKeyValueSpec = conf.Get(FieldSelectionHelper.ReduceOutputKeyValueSpec , "0-:"); allReduceValueFieldsFrom = FieldSelectionHelper.ParseOutputKeyValueSpec(reduceOutputKeyValueSpec , reduceOutputKeyFieldList, reduceOutputValueFieldList); Log.Info(FieldSelectionHelper.SpecToString(fieldSeparator, reduceOutputKeyValueSpec , allReduceValueFieldsFrom, reduceOutputKeyFieldList, reduceOutputValueFieldList )); }
/// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> protected internal override void Setup(Mapper.Context context) { Configuration conf = context.GetConfiguration(); this.fieldSeparator = conf.Get(FieldSelectionHelper.DataFieldSeperator, "\t"); this.mapOutputKeyValueSpec = conf.Get(FieldSelectionHelper.MapOutputKeyValueSpec, "0-:"); try { this.ignoreInputKey = typeof(TextInputFormat).GetCanonicalName().Equals(context.GetInputFormatClass ().GetCanonicalName()); } catch (TypeLoadException e) { throw new IOException("Input format class not found", e); } allMapValueFieldsFrom = FieldSelectionHelper.ParseOutputKeyValueSpec(mapOutputKeyValueSpec , mapOutputKeyFieldList, mapOutputValueFieldList); Log.Info(FieldSelectionHelper.SpecToString(fieldSeparator, mapOutputKeyValueSpec, allMapValueFieldsFrom, mapOutputKeyFieldList, mapOutputValueFieldList) + "\nignoreInputKey:" + ignoreInputKey); }