mr.setOrderBy(new OrderBy().add("url", Order.ASC).add("date", Order.ASC));
// Input / output and such
mr.setTupleReducer(new MovingAverageHandler(nDaysAverage));
mr.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
mr.addInput(new Path(input), new HadoopInputFormat(TextInputFormat.class), new URLVisitsProcessor());
mr.createJob().waitForCompletion(true);
return 1;
}
public static void main(String args[]) throws Exception {
ToolRunner.run(new MovingAverage(), args);