delete(output);
TupleMRBuilder mr = new TupleMRBuilder(conf, "Pangool Url Resolution");
mr.addIntermediateSchema(getURLMapSchema());
mr.addIntermediateSchema(getURLRegisterSchema());
mr.addInput(new Path(input1), new TupleTextInputFormat(getURLMapSchema(), false, false, '\t',
NO_QUOTE_CHARACTER, NO_ESCAPE_CHARACTER, null, null), new IdentityTupleMapper());
mr.addInput(new Path(input2), new TupleTextInputFormat(getURLRegisterSchema(), false, false, '\t',
NO_QUOTE_CHARACTER, NO_ESCAPE_CHARACTER, null, null), new IdentityTupleMapper());
mr.setFieldAliases("urlMap", new Aliases().add("url", "nonCanonicalUrl"));
mr.setGroupByFields("url");
mr.setOrderBy(new OrderBy().add("url", Order.ASC).addSchemaOrder(Order.ASC));
mr.setSpecificOrderBy("urlRegister", new OrderBy().add("timestamp", Order.ASC));