Package org.apache.flink.runtime.operators.testutils

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


    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

    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
   
    CombiningUnilateralSortMerger<Record> sorter = null;
    try {
      sorter = new CombiningUnilateralSortMerger<Record>(new MockCombiningReduceStub(),
        getMemoryManager(), getIOManager(), new UniformRecordGenerator(keyCnt, valCnt, false),
        getOwningNepheleTask(), RecordSerializerFactory.get(), this.comparator.duplicate(),
          this.perSortFractionMem,
          2, 0.8f);
      addInput(sorter.getIterator());
     
View Full Code Here

    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_REDUCE);
   
    CombiningUnilateralSortMerger<Record> sorter = null;
    try {
      sorter = new CombiningUnilateralSortMerger<Record>(new MockCombiningReduceStub(),
        getMemoryManager(), getIOManager(), new UniformRecordGenerator(keyCnt, valCnt, false),
        getOwningNepheleTask(), RecordSerializerFactory.get(), this.comparator.duplicate(),
          this.perSortFractionMem,
          2, 0.8f);
      addInput(sorter.getIterator());
     
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInputSorted(new UniformRecordGenerator(keyCnt2, valCnt2, false), this.comparator2.duplicate());
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInputSorted(new UniformRecordGenerator(keyCnt2, valCnt2, false), this.comparator2.duplicate());
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInputSorted(new UniformRecordGenerator(keyCnt2, valCnt2, false), this.comparator2.duplicate());
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInputSorted(new UniformRecordGenerator(keyCnt2, valCnt2, false), this.comparator2.duplicate());
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInputSorted(new UniformRecordGenerator(keyCnt2, valCnt2, false), this.comparator2.duplicate());
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

    setNumFileHandlesForSort(4);
   
    final MatchDriver<Record, Record, Record> testTask = new MatchDriver<Record, Record, Record>();
   
    try {
      addInputSorted(new UniformRecordGenerator(keyCnt1, valCnt1, false), this.comparator1.duplicate());
      addInput(new UniformRecordGenerator(keyCnt2, valCnt2, true));
      testDriver(testTask, MockMatchStub.class);
    } catch (Exception e) {
      e.printStackTrace();
      Assert.fail("The test caused an exception.");
    }
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.operators.testutils.UniformRecordGenerator

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.