TupleMRBuilder mr = new TupleMRBuilder(conf,"Pangool Url Resolution");
mr.addIntermediateSchema(getURLMapSchema());
mr.addIntermediateSchema(getURLRegisterSchema());
mr.setFieldAliases("urlMap",new Aliases().add("url","nonCanonicalUrl"));
mr.setGroupByFields("url");
mr.setOrderBy(new OrderBy().add("url", Order.ASC).addSchemaOrder(Order.ASC));
mr.setTupleReducer(new Handler());
mr.setOutput(new Path(output), new HadoopOutputFormat(TextOutputFormat.class), Text.class, NullWritable.class);
mr.addInput(new Path(input1), new HadoopInputFormat(TextInputFormat.class), new UrlMapProcessor());
mr.addInput(new Path(input2), new HadoopInputFormat(TextInputFormat.class), new UrlProcessor());
mr.createJob().waitForCompletion(true);