Examples of FieldList


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

    Channel c2 = coGroupNode.getInput2();
   
    Assert.assertEquals(LocalStrategy.SORT, c1.getLocalStrategy());
    Assert.assertEquals(LocalStrategy.SORT, c2.getLocalStrategy());
   
    FieldList ship1 = new FieldList(new int[] {3, 0});
    FieldList ship2 = new FieldList(new int[] {6, 0});
   
    FieldList local1 = new FieldList(new int[] {3, 0, 5});
    FieldList local2 = new FieldList(new int[] {6, 0, 1, 4});
   
    Assert.assertEquals(ship1, c1.getShipStrategyKeys());
    Assert.assertEquals(ship2, c2.getShipStrategyKeys());
    Assert.assertEquals(local1, c1.getLocalStrategyKeys());
    Assert.assertEquals(local2, c2.getLocalStrategyKeys());
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_GROUP_REDUCE, reduceNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(1), reduceNode.getKeys(0));
      assertEquals(new FieldList(1), reduceNode.getInput().getLocalStrategyKeys());
     
      // check DOP
      assertEquals(6, sourceNode.getDegreeOfParallelism());
      assertEquals(8, reduceNode.getDegreeOfParallelism());
      assertEquals(8, sinkNode.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_GROUP_REDUCE, reduceNode.getDriverStrategy());
      assertEquals(DriverStrategy.SORTED_GROUP_COMBINE, combineNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(1), reduceNode.getKeys(0));
      assertEquals(new FieldList(1), combineNode.getKeys(0));
      assertEquals(new FieldList(1), combineNode.getKeys(1));
      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_GROUP_REDUCE, reduceNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(0), reduceNode.getKeys(0));
      assertEquals(new FieldList(0), reduceNode.getInput().getLocalStrategyKeys());
     
      // check DOP
      assertEquals(6, sourceNode.getDegreeOfParallelism());
      assertEquals(6, keyExtractor.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_GROUP_REDUCE, reduceNode.getDriverStrategy());
      assertEquals(DriverStrategy.SORTED_GROUP_COMBINE, combineNode.getDriverStrategy());
     
      // check the keys
      assertEquals(new FieldList(0), reduceNode.getKeys(0));
      assertEquals(new FieldList(0), combineNode.getKeys(0));
      assertEquals(new FieldList(0), combineNode.getKeys(1));
      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

    assertEquals(4, s4.size());
  }
 
  @Test
  public void testAddListToSet() {
    check(new FieldSet().addField(1).addFields(new FieldList(14, 3, 1)), 1, 3, 14);
  }
View Full Code Here

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

public class FieldListTest {
 
  @Test
  public void testFieldListConstructors() {
    check(new FieldList());
    check(FieldList.EMPTY_LIST);
    check(new FieldList(14), 14);
    check(new FieldList(new Integer(3)), 3);
    check(new FieldList(7, 4, 1), 7, 4, 1);
    check(new FieldList(7, 4, 1, 4, 7, 1, 4, 2), 7, 4, 1, 4, 7, 1, 4, 2);
  }
View Full Code Here

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

    check(new FieldList(7, 4, 1, 4, 7, 1, 4, 2), 7, 4, 1, 4, 7, 1, 4, 2);
  }
 
  @Test
  public void testFieldListAdds() {
    check(new FieldList().addField(1).addField(2), 1, 2);
    check(FieldList.EMPTY_LIST.addField(3).addField(2), 3, 2);
    check(new FieldList(13).addFields(new FieldList(17, 31, 42)), 13, 17, 31, 42);
    check(new FieldList(14).addFields(new FieldList(17)), 14, 17);
    check(new FieldList(3).addFields(2, 8, 5, 7), 3, 2, 8, 5, 7);
  }
View Full Code Here

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

    check(new FieldList(3).addFields(2, 8, 5, 7), 3, 2, 8, 5, 7);
  }
 
  @Test
  public void testImmutability() {
    FieldList s1 = new FieldList();
    FieldList s2 = new FieldList(5);
    FieldList s3 = new FieldList(new Integer(7));
    FieldList s4 = new FieldList(5, 4, 7, 6);
   
    s1.addFields(s2).addFields(s3);
    s2.addFields(s4);
    s4.addFields(s1);
   
    s1.addField(new Integer(14));
    s2.addFields(78, 13, 66, 3);
   
    assertEquals(0, s1.size());
    assertEquals(1, s2.size());
    assertEquals(1, s3.size());
    assertEquals(4, s4.size());
  }
View Full Code Here

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

    assertEquals(4, s4.size());
  }
 
  @Test
  public void testAddSetToList() {
    check(new FieldList().addFields(new FieldSet(1)).addFields(2), 1, 2);
    check(new FieldList().addFields(1).addFields(new FieldSet(2)), 1, 2);
    check(new FieldList().addFields(new FieldSet(2)), 2);
  }
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.