Example #1
0
    protected void reduce(Text key, Iterable<DoubleWritable> values, Context context)
        throws IOException, InterruptedException {
      if (record == null) {
        throw new IOException("No output record found");
      }

      record.set(0, 125, true);
      record.set(1, true, true);
      record.set(2, 'c', true);
      record.set(3, Calendar.getInstance().getTime(), true);
      record.set(4, 234.526, true);
      record.set(5, Calendar.getInstance().getTime(), true);
      record.set(6, "foobar string", true);
      record.set(7, new byte[10], true);
      context.write(new Text("mrtarget"), record);
    }