Examples of UniformRecordGenerator


Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    getTaskConfig().setDriverStrategy(DriverStrategy.CO_GROUP);
   
    final CoGroupDriver<Record, Record, Record> testTask = new CoGroupDriver<Record, Record, Record>();
   
    try {
      addInput(new UniformRecordGenerator(keyCnt, valCnt, true));
      addInputSorted(new DelayingInfinitiveInputIterator(1000), this.comparator2.duplicate());
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

  //
  //
 
  private final MutableObjectIterator<Record> getProbeInput(final int numKeys,
      final int probeValsPerKey, final int repeatedValue1, final int repeatedValue2) {
    MutableObjectIterator<Record> probe1 = new UniformRecordGenerator(numKeys, probeValsPerKey, true);
    MutableObjectIterator<Record> probe2 = new ConstantsKeyValuePairsIterator(repeatedValue1, 17, 5);
    MutableObjectIterator<Record> probe3 = new ConstantsKeyValuePairsIterator(repeatedValue2, 23, 5);
    List<MutableObjectIterator<Record>> probes = new ArrayList<MutableObjectIterator<Record>>();
    probes.add(probe1);
    probes.add(probe2);
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    getTaskConfig().setDriverStrategy(DriverStrategy.CO_GROUP);
   
    final CoGroupDriver<Record, Record, Record> testTask = new CoGroupDriver<Record, Record, Record>();
   
    try {
      addInput(new UniformRecordGenerator(keyCnt, valCnt, true));
      addInput(new UniformRecordGenerator(keyCnt, valCnt, true));
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
   
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    final int NUM_KEYS = 1000000;
    final int BUILD_VALS_PER_KEY = 3;
    final int PROBE_VALS_PER_KEY = 10;
   
    // create a build input that gives 3 million pairs with 3 values sharing the same key, plus 400k pairs with two colliding keys
    MutableObjectIterator<Record> build1 = new UniformRecordGenerator(NUM_KEYS, BUILD_VALS_PER_KEY, false);
    MutableObjectIterator<Record> build2 = new ConstantsKeyValuePairsIterator(REPEATED_VALUE_1, 17, REPEATED_VALUE_COUNT_BUILD);
    MutableObjectIterator<Record> build3 = new ConstantsKeyValuePairsIterator(REPEATED_VALUE_2, 23, REPEATED_VALUE_COUNT_BUILD);
    List<MutableObjectIterator<Record>> builds = new ArrayList<MutableObjectIterator<Record>>();
    builds.add(build1);
    builds.add(build2);
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    final int NUM_KEYS = 1000000;
    final int BUILD_VALS_PER_KEY = 3;
    final int PROBE_VALS_PER_KEY = 10;
   
    // create a build input that gives 3 million pairs with 3 values sharing the same key, plus 400k pairs with two colliding keys
    MutableObjectIterator<Record> build1 = new UniformRecordGenerator(NUM_KEYS, BUILD_VALS_PER_KEY, false);
    MutableObjectIterator<Record> build2 = new ConstantsKeyValuePairsIterator(REPEATED_VALUE_1, 17, REPEATED_VALUE_COUNT_BUILD);
    MutableObjectIterator<Record> build3 = new ConstantsKeyValuePairsIterator(REPEATED_VALUE_2, 23, REPEATED_VALUE_COUNT_BUILD);
    List<MutableObjectIterator<Record>> builds = new ArrayList<MutableObjectIterator<Record>>();
    builds.add(build1);
    builds.add(build2);
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    int valCnt = 20;
   
    this.outList = new ArrayList<Record>();
   
    try {
      InputFilePreparator.prepareInputFile(new UniformRecordGenerator(keyCnt, valCnt, false),
        this.tempTestPath, true);
    } catch (IOException e1) {
      Assert.fail("Unable to set-up test input file");
    }
   
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    int valCnt = 10;
   
    this.outList = new NirvanaOutputList();
   
    try {
      InputFilePreparator.prepareInputFile(new UniformRecordGenerator(keyCnt, valCnt, false),
        this.tempTestPath, false);
    } catch (IOException e1) {
      Assert.fail("Unable to set-up test input file");
    }
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    super.initEnvironment(MEMORY_MANAGER_SIZE, NETWORK_BUFFER_SIZE);
    super.addOutput(new NirvanaOutputList());
   
    try {
      InputFilePreparator.prepareInputFile(new UniformRecordGenerator(keyCnt, valCnt, false),
        this.tempTestPath, false);
    } catch (IOException e1) {
      Assert.fail("Unable to set-up test input file");
    }
   
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

    addDriverComparator(this.comparator);
    setOutput(this.outList);
    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt, valCnt, false), this.comparator.duplicate());
     
      GroupReduceDriver<Record, Record> testTask = new GroupReduceDriver<Record, Record>();
     
      testDriver(testTask, MockReduceStub.class);
    } catch (Exception e) {
View Full Code Here

Examples of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

  @Test
  public void testReduceTaskOnPreSortedInput() {
    final int keyCnt = 100;
    final int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, true));
    addDriverComparator(this.comparator);
    setOutput(this.outList);
    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
   
    GroupReduceDriver<Record, Record> testTask = new GroupReduceDriver<Record, Record>();
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.