/** * JoinFunction that joins the filtered entries from the documents and the * ranks relation. */ @ConstantFieldsSecondExcept({}) public static class JoinDocRanks extends JoinFunction implements Serializable { private static final long serialVersionUID = 1L; /** * Joins entries from the documents and ranks relation on their URL. * * Output Format: * 0: URL * 1: RANK * 2: AVG_DURATION */ @Override public void join(Record document, Record rank, Collector<Record> out) throws Exception { out.collect(rank); } }
/** * Realizes the join between Customers and Order table. */ @ConstantFieldsSecondExcept(0) public static class JoinCO extends JoinFunction implements Serializable { private static final long serialVersionUID = 1L; private final IntValue one = new IntValue(1); /** * Output Schema: * 0: PARTIAL_COUNT=1 * 1: C_MKTSEGMENT */ @Override public void join(Record order, Record cust, Collector<Record> out) throws Exception { cust.setField(0, one); out.collect(cust); } }
@ConstantFieldsSecondExcept({}) public static final class UpdateComponentIdMatchMirrored extends JoinFunction implements Serializable { private static final long serialVersionUID = 1L; @Override public void join(Record currentVertexWithComponent, Record newVertexWithComponent, Collector<Record> out){ long candidateComponentID = newVertexWithComponent.getField(1, LongValue.class).getValue(); long currentComponentID = currentVertexWithComponent.getField(1, LongValue.class).getValue(); if (candidateComponentID < currentComponentID) { out.collect(newVertexWithComponent); } } }