Esempio n. 1
0
            /// <exception cref="System.IO.IOException"/>
            protected override void Map(LongWritable key, Text value, Mapper.Context context)
            {
                StringBuilder sb = new StringBuilder(512);

                for (int i = 0; i < 1000; i++)
                {
                    sb.Append("a");
                }
                context.SetStatus(sb.ToString());
                int progressStatusLength = context.GetConfiguration().GetInt(MRConfig.ProgressStatusLenLimitKey
                                                                             , MRConfig.ProgressStatusLenLimitDefault);

                if (context.GetStatus().Length > progressStatusLength)
                {
                    throw new IOException("Status is not truncated");
                }
            }