Examples of FieldList


Examples of org.apache.flink.api.common.operators.util.FieldList

   * @return True, if the resulting properties are non trivial.
   */
  public LocalProperties filterByNodesConstantSet(OptimizerNode node, int input) {
    // check, whether the local order is preserved
    Ordering no = this.ordering;
    FieldList ngf = this.groupedFields;
    Set<FieldSet> nuf = this.uniqueFields;
   
    if (this.ordering != null) {
      final FieldList involvedIndexes = this.ordering.getInvolvedIndexes();
      for (int i = 0; i < involvedIndexes.size(); i++) {
        if (!node.isFieldConstant(input, involvedIndexes.get(i))) {
          if (i == 0) {
            no = null;
            ngf = null;
          } else {
            no = this.ordering.createNewOrderingUpToIndex(i);
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

   *
   * @return True, if the resulting properties are non trivial.
   */
  public RequestedLocalProperties filterByNodesConstantSet(OptimizerNode node, int input) {
    if (this.ordering != null) {
      final FieldList involvedIndexes = this.ordering.getInvolvedIndexes();
      for (int i = 0; i < involvedIndexes.size(); i++) {
        if (!node.isFieldConstant(input, involvedIndexes.get(i))) {
          return null;
        }
      }
    } else if (this.groupedFields != null) {
      // check, whether the local key grouping is preserved
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      SingleInputPlanNode agg2Reducer = (SingleInputPlanNode) sink.getInput().getSource();
      SingleInputPlanNode agg2Combiner = (SingleInputPlanNode) agg2Reducer.getInput().getSource();
      SingleInputPlanNode agg1Reducer = (SingleInputPlanNode) agg2Combiner.getInput().getSource();
     
      assertEquals(ShipStrategyType.PARTITION_HASH, agg2Reducer.getInput().getShipStrategy());
      assertEquals(new FieldList(0), agg2Reducer.getInput().getShipStrategyKeys());
     
      assertEquals(ShipStrategyType.FORWARD, agg2Combiner.getInput().getShipStrategy());
     
      assertEquals(ShipStrategyType.PARTITION_HASH, agg1Reducer.getInput().getShipStrategy());
      assertEquals(new FieldList(0, 1), agg1Reducer.getInput().getShipStrategyKeys());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      SingleInputPlanNode agg1Reducer = (SingleInputPlanNode) agg2Reducer.getInput().getSource();
     
      assertEquals(ShipStrategyType.FORWARD, agg2Reducer.getInput().getShipStrategy());
     
      assertEquals(ShipStrategyType.PARTITION_HASH, agg1Reducer.getInput().getShipStrategy());
      assertEquals(new FieldList(0), agg1Reducer.getInput().getShipStrategyKeys());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      // the in-loop partitioning is before the final reducer
     
      // verify joinWithInvariant
      assertEquals(ShipStrategyType.FORWARD, joinWithInvariantNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithInvariantNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput1());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput2());
     
      // verify joinWithSolutionSet
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithSolutionSetNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.FORWARD, joinWithSolutionSetNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 0), joinWithSolutionSetNode.getKeysForInput1());
     
     
      // verify reducer
      assertEquals(ShipStrategyType.PARTITION_HASH, worksetReducer.getInput().getShipStrategy());
      assertEquals(new FieldList(1, 2), worksetReducer.getKeys(0));
     
      // currently, the system may partition before or after the mapper
      ShipStrategyType ss1 = deltaMapper.getInput().getShipStrategy();
      ShipStrategyType ss2 = deltaMapper.getOutgoingChannels().get(0).getShipStrategy();
     
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      // the in-loop partitioning is before the final reducer
     
      // verify joinWithInvariant
      assertEquals(ShipStrategyType.FORWARD, joinWithInvariantNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithInvariantNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput1());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput2());
     
      // verify joinWithSolutionSet
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithSolutionSetNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.FORWARD, joinWithSolutionSetNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 0), joinWithSolutionSetNode.getKeysForInput1());
     
      // verify reducer
      assertEquals(ShipStrategyType.PARTITION_HASH, worksetReducer.getInput().getShipStrategy());
      assertEquals(new FieldList(1, 2), worksetReducer.getKeys(0));
     
      // verify solution delta
      assertEquals(2, joinWithSolutionSetNode.getOutgoingChannels().size());
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithSolutionSetNode.getOutgoingChannels().get(0).getShipStrategy());
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithSolutionSetNode.getOutgoingChannels().get(1).getShipStrategy());
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      // the in-loop partitioning is before the final reducer
     
      // verify joinWithInvariant
      assertEquals(ShipStrategyType.FORWARD, joinWithInvariantNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithInvariantNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput1());
      assertEquals(new FieldList(1, 2), joinWithInvariantNode.getKeysForInput2());
     
      // verify joinWithSolutionSet
      assertEquals(ShipStrategyType.PARTITION_HASH, joinWithSolutionSetNode.getInput1().getShipStrategy());
      assertEquals(ShipStrategyType.FORWARD, joinWithSolutionSetNode.getInput2().getShipStrategy());
      assertEquals(new FieldList(1, 0), joinWithSolutionSetNode.getKeysForInput1());
     
      // verify reducer
      assertEquals(ShipStrategyType.FORWARD, worksetReducer.getInput().getShipStrategy());
      assertEquals(new FieldList(1, 2), worksetReducer.getKeys(0));
     
     
      // verify solution delta
      assertEquals(1, joinWithSolutionSetNode.getOutgoingChannels().size());
      assertEquals(ShipStrategyType.FORWARD, joinWithSolutionSetNode.getOutgoingChannels().get(0).getShipStrategy());
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      // check that both reduce and combiner have the same strategy
      assertEquals(DriverStrategy.SORTED_REDUCE, reduceNode.getDriverStrategy());
      assertEquals(DriverStrategy.SORTED_PARTIAL_REDUCE, combineNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(1), reduceNode.getKeys(0));
      assertEquals(new FieldList(1), combineNode.getKeys(0));
      assertEquals(new FieldList(1), reduceNode.getInput().getLocalStrategyKeys());
     
      // check DOP
      assertEquals(6, sourceNode.getDegreeOfParallelism());
      assertEquals(6, combineNode.getDegreeOfParallelism());
      assertEquals(8, reduceNode.getDegreeOfParallelism());
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

      // check that both reduce and combiner have the same strategy
      assertEquals(DriverStrategy.SORTED_REDUCE, reduceNode.getDriverStrategy());
      assertEquals(DriverStrategy.SORTED_PARTIAL_REDUCE, combineNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(0), reduceNode.getKeys(0));
      assertEquals(new FieldList(0), combineNode.getKeys(0));
      assertEquals(new FieldList(0), reduceNode.getInput().getLocalStrategyKeys());
     
      // check DOP
      assertEquals(6, sourceNode.getDegreeOfParallelism());
      assertEquals(6, keyExtractor.getDegreeOfParallelism());
      assertEquals(6, combineNode.getDegreeOfParallelism());
View Full Code Here

Examples of org.apache.flink.api.common.operators.util.FieldList

    Assert.assertEquals(ShipStrategyType.PARTITION_HASH, reducer.getInput().getShipStrategy());
   
    Channel c = reducer.getInput();
    Assert.assertEquals(LocalStrategy.SORT, c.getLocalStrategy());
   
    FieldList ship = new FieldList(2);
    FieldList local = new FieldList(2, 5);
    Assert.assertEquals(ship, c.getShipStrategyKeys());
    Assert.assertEquals(local, c.getLocalStrategyKeys());
    Assert.assertTrue(c.getLocalStrategySortOrder()[0] == reducer.getSortOrders(0)[0]);
   
    // check that we indeed sort descending
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.