Example #1
0
        /// <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);
        }