@Override public void map(LongWritable key, Text value, Context context) throws IOException { 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.PROGRESS_STATUS_LEN_LIMIT_KEY, MRConfig.PROGRESS_STATUS_LEN_LIMIT_DEFAULT); if (context.getStatus().length() > progressStatusLength) { throw new IOException("Status is not truncated"); } } }
@Override protected void setup(Context context) throws IOException { context.setStatus(myStatus); assertEquals(myStatus, context.getStatus()); } }
@Override protected void setup(Context context) throws IOException { context.setStatus(myStatus); assertEquals(myStatus, context.getStatus()); } }