Package eu.stratosphere.pact.runtime.test.util

Examples of eu.stratosphere.pact.runtime.test.util.UniformRecordGenerator


  @Test
  public void testHashCancelMatchTaskWhileBuildSecond() {
    int keyCnt = 20;
    int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInput(new DelayingInfinitiveInputIterator(100));
    addInputComparator(this.comparator1);
    addInputComparator(this.comparator2);
    getTaskConfig().setDriverPairComparator(RecordPairComparatorFactory.get());
    setOutput(new NirvanaOutputList());
View Full Code Here


  @Test
  public void testHashFirstCancelMatchTaskWhileMatching() {
    int keyCnt = 20;
    int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInputComparator(this.comparator1);
    addInputComparator(this.comparator2);
    getTaskConfig().setDriverPairComparator(RecordPairComparatorFactory.get());
    setOutput(new NirvanaOutputList());
    getTaskConfig().setDriverStrategy(DriverStrategy.HYBRIDHASH_BUILD_FIRST);
View Full Code Here

  @Test
  public void testHashSecondCancelMatchTaskWhileMatching() {
    int keyCnt = 20;
    int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInputComparator(this.comparator1);
    addInputComparator(this.comparator2);
    getTaskConfig().setDriverPairComparator(RecordPairComparatorFactory.get());
    setOutput(new NirvanaOutputList());
    getTaskConfig().setDriverStrategy(DriverStrategy.HYBRIDHASH_BUILD_SECOND);
View Full Code Here

  @Test
  public void testCombineTask() {
    int keyCnt = 100;
    int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInputComparator(this.comparator);
    setOutput(this.outList);
   
    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_COMBINE);
    getTaskConfig().setMemoryDriver(COMBINE_MEM);
View Full Code Here

  @Test
  public void testFailingCombineTask() {
    int keyCnt = 100;
    int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    addInputComparator(this.comparator);
    setOutput(new DiscardingOutputCollector<Record>());
   
    getTaskConfig().setDriverStrategy(DriverStrategy.SORTED_GROUP_COMBINE);
    getTaskConfig().setMemoryDriver(COMBINE_MEM);
View Full Code Here

  @Test
  public void testMapTask() {
    final int keyCnt = 100;
    final int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    setOutput(this.output);
   
    final CollectorMapDriver<Record, Record> testDriver = new CollectorMapDriver<Record, Record>();
   
    try {
View Full Code Here

  @Test
  public void testFailingMapTask() {
    final int keyCnt = 100;
    final int valCnt = 20;
   
    addInput(new UniformRecordGenerator(keyCnt, valCnt, false));
    setOutput(new DiscardingOutputCollector<Record>());
   
    final CollectorMapDriver<Record, Record> testTask = new CollectorMapDriver<Record, Record>();
    try {
      testDriver(testTask, MockFailingMapStub.class);
View Full Code Here

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

    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

    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

TOP

Related Classes of eu.stratosphere.pact.runtime.test.util.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.