Package eu.stratosphere.api.java.record.operators

Examples of eu.stratosphere.api.java.record.operators.JoinOperator


    MapOperator mapSupplier = MapOperator.builder(SupplierMap.class)
      .name("proj.Partsupp")
      .build();

    /* Equijoin on partkey of part and partsupp: */
    JoinOperator partsJoin = JoinOperator.builder(PartJoin.class, IntValue.class, 0, 0)
      .name("partsJoin")
      .build();

    /* Equijoin on orderkey of orders and lineitem: */
    JoinOperator orderedPartsJoin =
      JoinOperator.builder(OrderedPartsJoin.class, IntValue.class, 0, 0)
      .name("orderedPartsJoin")
      .build();

    /* Equijoin on nationkey of supplier and nation: */
    JoinOperator suppliersJoin =
      JoinOperator.builder(SuppliersJoin.class, IntValue.class, 0, 0)
      .name("suppliersJoin")
      .build();

    /* Equijoin on (partkey,suppkey) of parts and orderedParts: */
    JoinOperator filteredPartsJoin =
      JoinOperator.builder(FilteredPartsJoin.class, IntPair.class, 0, 0)
      .name("filteredPartsJoin")
      .build();

    /* Equijoin on suppkey of filteredParts and suppliers: */
    JoinOperator partListJoin =
      JoinOperator.builder(PartListJoin.class, IntValue.class , 0, 0)
      .name("partlistJoin")
      .build();

    /* Aggregate sum(amount) by (nation,year): */
    ReduceOperator sumAmountAggregate =
      ReduceOperator.builder(AmountAggregate.class, StringIntPair.class, 0)
      .name("groupyBy")
      .build();

    /* Connect input filters: */
    filterPart.setInput(partInput);
    mapPartsupp.setInput(partSuppInput);
    mapOrder.setInput(ordersInput);
    mapLineItem.setInput(lineItemInput);
    mapSupplier.setInput(supplierInput);

    /* Connect equijoins: */
    partsJoin.setFirstInput(filterPart);
    partsJoin.setSecondInput(mapPartsupp);
    orderedPartsJoin.setFirstInput(mapOrder);
    orderedPartsJoin.setSecondInput(mapLineItem);
    suppliersJoin.setFirstInput(mapSupplier);
    suppliersJoin.setSecondInput(nationInput);
    filteredPartsJoin.setFirstInput(partsJoin);
    filteredPartsJoin.setSecondInput(orderedPartsJoin);
    partListJoin.setFirstInput(filteredPartsJoin);
    partListJoin.setSecondInput(suppliersJoin);

    /* Connect aggregate: */
    sumAmountAggregate.setInput(partListJoin);

    /* Connect sink: */
 
View Full Code Here


    DeltaIteration iteration = new DeltaIteration(0, ITERATION_NAME);
    iteration.setInitialSolutionSet(solutionSetInput);
    iteration.setInitialWorkset(worksetInput);
    iteration.setMaximumNumberOfIterations(100);

    JoinOperator joinWithInvariant = JoinOperator.builder(new DummyMatchStub(), LongValue.class, 0, 0)
        .input1(iteration.getWorkset())
        .input2(invariantInput)
        .name(JOIN_WITH_INVARIANT_NAME)
        .build();

    JoinOperator joinWithSolutionSet = JoinOperator.builder(
        joinPreservesSolutionSet ? new DummyMatchStub() : new DummyNonPreservingMatchStub(), LongValue.class, 0, 0)
        .input1(iteration.getSolutionSet())
        .input2(joinWithInvariant)
        .name(JOIN_WITH_SOLUTION_SET)
        .build();
View Full Code Here

TOP

Related Classes of eu.stratosphere.api.java.record.operators.JoinOperator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.