Package eu.stratosphere.test.recordJobs.util

Examples of eu.stratosphere.test.recordJobs.util.IntTupleDataInFormat


    {
      setArgs(args);
    }
   
    FileDataSource orders =
      new FileDataSource(new IntTupleDataInFormat(), this.ordersInputPath, "Orders");
    orders.setDegreeOfParallelism(this.degreeOfParallelism);
    //orders.setOutputContract(UniqueKey.class);
   
    FileDataSource lineItems =
      new FileDataSource(new IntTupleDataInFormat(), this.lineItemInputPath, "LineItems");
    lineItems.setDegreeOfParallelism(this.degreeOfParallelism);
   
    FileDataSink result =
        new FileDataSink(new StringTupleDataOutFormat(), this.outputPath, "Output");
    result.setDegreeOfParallelism(degreeOfParallelism);
View Full Code Here


      this.lineItemInputPath = args[1];
      this.outputPath = args[2];
    }
   
    FileDataSource lineItems =
      new FileDataSource(new IntTupleDataInFormat(), this.lineItemInputPath, "LineItems");
    lineItems.setDegreeOfParallelism(this.degreeOfParallelism);
   
    FileDataSink result =
      new FileDataSink(new StringTupleDataOutFormat(), this.outputPath, "Output");
    result.setDegreeOfParallelism(this.degreeOfParallelism);
View Full Code Here

      1,2,3,-1,-2,Integer.MAX_VALUE,Integer.MIN_VALUE
    };
   
    int[] expectedAttrCnt = {6,2,3,3,3,5,5};

    IntTupleDataInFormat inFormat = new IntTupleDataInFormat();
    Record rec = new Record()
   
    for(int i = 0; i < testTuples.length; i++) {
     
      byte[] tupleBytes = testTuples[i].getBytes();
     
      inFormat.readRecord(rec, tupleBytes, 0, tupleBytes.length);
     
      Assert.assertTrue("Expected Key: "+expectedKeys[i]+" != Returned Key: "+rec.getField(0, IntValue.class), rec.getField(0, IntValue.class).equals(new IntValue(expectedKeys[i])));
      Assert.assertTrue("Expected Attr Cnt: "+expectedAttrCnt[i]+" != Returned Attr Cnt: "+rec.getField(1, Tuple.class), rec.getField(1, Tuple.class).getNumberOfColumns() == expectedAttrCnt[i]);
    }
  }
View Full Code Here

      customersPath = args[3];
      nationsPath = args[4];
      resultPath = args[5];
    }
   
    FileDataSource orders = new FileDataSource(new IntTupleDataInFormat(), ordersPath, "Orders");
    // orders.setOutputContract(UniqueKey.class);
    // orders.getCompilerHints().setAvgNumValuesPerKey(1);

    FileDataSource lineitems = new FileDataSource(new IntTupleDataInFormat(), lineitemsPath, "LineItems");
    // lineitems.getCompilerHints().setAvgNumValuesPerKey(4);

    FileDataSource customers = new FileDataSource(new IntTupleDataInFormat(), customersPath, "Customers");

    FileDataSource nations = new FileDataSource(new IntTupleDataInFormat(), nationsPath, "Nations");


    MapOperator mapO = MapOperator.builder(FilterO.class)
      .name("FilterO")
      .build();
View Full Code Here

    }
   
    /* Create the 6 data sources: */
    /* part: (partkey | name, mfgr, brand, type, size, container, retailprice, comment) */
    FileDataSource partInput = new FileDataSource(
      new IntTupleDataInFormat(), this.partInputPath, "\"part\" source");
    //partInput.setOutputContract(UniqueKey.class);
//    partInput.getCompilerHints().setAvgNumValuesPerKey(1);

    /* partsupp: (partkey | suppkey, availqty, supplycost, comment) */
    FileDataSource partSuppInput = new FileDataSource(
      new IntTupleDataInFormat(), this.partSuppInputPath, "\"partsupp\" source");

    /* orders: (orderkey | custkey, orderstatus, totalprice, orderdate, orderpriority, clerk, shippriority, comment) */
    FileDataSource ordersInput = new FileDataSource(
      new IntTupleDataInFormat(), this.ordersInputPath, "\"orders\" source");
    //ordersInput.setOutputContract(UniqueKey.class);
//    ordersInput.getCompilerHints().setAvgNumValuesPerKey(1);

    /* lineitem: (orderkey | partkey, suppkey, linenumber, quantity, extendedprice, discount, tax, ...) */
    FileDataSource lineItemInput = new FileDataSource(
      new IntTupleDataInFormat(), this.lineItemInputPath, "\"lineitem\" source");

    /* supplier: (suppkey | name, address, nationkey, phone, acctbal, comment) */
    FileDataSource supplierInput = new FileDataSource(
      new IntTupleDataInFormat(), this.supplierInputPath, "\"supplier\" source");
    //supplierInput.setOutputContract(UniqueKey.class);
//    supplierInput.getCompilerHints().setAvgNumValuesPerKey(1);

    /* nation: (nationkey | name, regionkey, comment) */
    FileDataSource nationInput = new FileDataSource(
      new IntTupleDataInFormat(), this.nationInputPath, "\"nation\" source");
    //nationInput.setOutputContract(UniqueKey.class);
//    nationInput.getCompilerHints().setAvgNumValuesPerKey(1);

    /* Filter on part's name, project values to NULL: */
    MapOperator filterPart = MapOperator.builder(PartFilter.class)
View Full Code Here

TOP

Related Classes of eu.stratosphere.test.recordJobs.util.IntTupleDataInFormat

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.