Examples of BigTupleList


Examples of com.ebay.erl.mobius.core.collection.BigTupleList

    // process extend function for this current dataset and save the result
    List<ExtendFunction> extendFunctions  = this.singleDatasetExtendFunction.get(datasetID);
    if( extendFunctions==null )
      return;
   
    BigTupleList computedResult        = null;
    if( (computedResult=this.singleDatasetExtendFunResult.get(datasetID))==null )
    {
      computedResult = new BigTupleList(reporter);
      this.singleDatasetExtendFunResult.put(datasetID, computedResult);
    }
    if( onlyHasGroupKeyExtendFunctions.get(datasetID) )
    {
      if(computedResult.size()==0 )
        this.computeExtendFunctions(aRow, computedResult, extendFunctions);
    }
    else
    {
      this.computeExtendFunctions(aRow, computedResult, extendFunctions);
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

       
        p.setCalledByCombiner(true);
       
        if( p instanceof GroupFunction )
        {
          groupFunctionResults.put((GroupFunction)p, new BigTupleList(null));
        }
      }
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

     
      for( Projectable p:this.dsToFuncsMapping.get(datasetID) )
      {
        if( p instanceof GroupFunction )
        {
          BigTupleList aggregatedResult = ((GroupFunction)p).getResult();
          if( aggregatedResult.size() ==1 )
          {
            Tuple aggResult = aggregatedResult.getFirst();
            String name = p.getInputColumns()[0].getInputColumnName();
            combinedValue.insert(name, aggResult.get(0));
          }
          else if( aggregatedResult.size()>1 )
            throw new IllegalArgumentException(p.toString()+" is a group function that generates " +
                "more than one rows ("+aggregatedResult.size()+") per key, so it is not combinable.");
        }
      }
     
      DataJoinKey outKey    = new DataJoinKey(datasetID, key);
      DataJoinValue outValue  = new DataJoinValue(datasetID, combinedValue);
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

  {
    // no need to cross product if there is only one dataset
    if( datasets.length==1 )
      return datasets[0];
   
    BigTupleList result = new BigTupleList(reporter);
    result.addAll(datasets[0]);
   
    for( int i=1;i<datasets.length;i++ )
    {
      Iterable<Tuple> dataset1 = result;
      Iterable<Tuple> dataset2 = datasets[i];
     
      if( dataset2!=null )
      {     
        BigTupleList temp = new BigTupleList(reporter);
        Iterator<Tuple> it1 = dataset1.iterator();
        while( it1.hasNext() )
        {
          Tuple rowFromDS1 = it1.next();
         
          Iterator<Tuple> it2 = dataset2.iterator();
          while( it2.hasNext() )
          {
            Tuple merged = Tuple.merge(rowFromDS1, it2.next());
            temp.add(merged);
          }
          close(it2);
        }
        close(it1);
        result.clear();
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

   
    List<Tuple> ds3 = this.generate(5, new String[]{"X"});
   
    // the cross product should be 30 rows
   
    BigTupleList result = (BigTupleList)Util.crossProduct(null, null, ds1, ds2, ds3);
   
    Assert.assertEquals(30, result.size());
   
    Tuple first = new Tuple();
    first
      .put("a", "A_1")
      .put("aa", "AA_1")
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

 
 
  protected BigTupleList getRowsToBeOutputted()
  {
    if( this.rowsToBeOutputted==null )
      this.rowsToBeOutputted = new BigTupleList(this.reporter);
    return this.rowsToBeOutputted;
  }
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

   */
  protected void output(Tuple tuple)
  {
    if( this.rowsToBeOutputted==null )
    {
      this.rowsToBeOutputted = new BigTupleList(this.reporter);
    }
   
    this.rowsToBeOutputted.add(tuple);
  }
View Full Code Here

Examples of com.ebay.erl.mobius.core.collection.BigTupleList

 
  public final BigTupleList getNoMatchResult(Object nullReplacement)
  {
    if( noMatchResult==null )
    {
      noMatchResult = new BigTupleList(this.reporter);
     
      Tuple nullRow = new Tuple();
      for( String aColumn:this.getOutputSchema() )
      {
        if( nullReplacement==null )
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.