Schema schema = new Schema("my_schema", fields);
TupleMRBuilder mr = new TupleMRBuilder(conf);
mr.addIntermediateSchema(schema);
mr.setGroupByFields("location", "date", "hashtag");
mr.setOrderBy(new OrderBy().add("location", Order.ASC).add("date", Order.ASC).add("hashtag", Order.ASC));
mr.setRollupFrom("date");
// Input / output and such
mr.setTupleReducer(new TweetsHandler(n));
mr.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
mr.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class), new TweetsProcessor());