Package com.tdunning.plume.local.lazy.op

Examples of com.tdunning.plume.local.lazy.op.Flatten


      newInput.type = ((LazyCollection)flatten.getDest()).getType();
      fInput.downOps.remove(0);
      fInput.addDownOp(newInput.deferredOp);
      newOrigins.add(newInput);
    }
    Flatten<?> newFlatten = new Flatten(newOrigins, op.getDest());
    ((LazyCollection<?>)op.getDest()).deferredOp = newFlatten;
    for(PCollection<?> newOp: newOrigins) {
      ((LazyCollection<?>)newOp).addDownOp(newFlatten);
    }
  }
View Full Code Here


    optimizer.sinkFlattens(output);
    // Execute and assert the result after optimizing
    executeAndAssert((LazyCollection<Integer>)output, new Integer[] { 2, 3, 4, 5, 6, 7 });   
    // Check that optimizer did what it's supposed to do
    assertTrue(lOutput.getDeferredOp() instanceof Flatten);
    Flatten flatten = (Flatten)lOutput.getDeferredOp();
    assertEquals(flatten.getOrigins().size(), 2);
    for(int i = 0; i < 2; i++) {
      LazyCollection<Integer> origin = (LazyCollection<Integer>) flatten.getOrigins().get(i);
      ParallelDo newPDo = (ParallelDo)origin.getDeferredOp();
      assertEquals(newPDo.getFunction(), plusOne);
      assertTrue(newPDo.getOrigin() == input1 || newPDo.getOrigin() == input2);
    }
  }
View Full Code Here

TOP

Related Classes of com.tdunning.plume.local.lazy.op.Flatten

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.