SourcePlanNode candidate = new SourcePlanNode(this, "DataSource ("+this.getOperator().getName()+")", this.gprops, this.lprops);
@Test public void testNoPartialSolutionFoundSingleInputOnly() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Source"); SourcePlanNode otherTarget = new SourcePlanNode(getSourceNode(), "Source");
@Test public void testNoPartialSolutionFoundTwoInputOperator() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Partial Solution"); SourcePlanNode source1 = new SourcePlanNode(getSourceNode(), "Source 1"); SourcePlanNode source2 = new SourcePlanNode(getSourceNode(), "Source 2");
@Test public void testGetEstimatesNoReplicationFactor() { final long NUM_RECORD = 1001; final long SIZE = 467131; DataSourceNode source = getSourceNode(); SourcePlanNode planNode = new SourcePlanNode(source, "test node"); Channel channel = new Channel(planNode); // no estimates here Assert.assertEquals(-1, channel.getEstimatedOutputSize()); Assert.assertEquals(-1, channel.getEstimatedNumRecords()); // set estimates source.setEstimatedNumRecords(NUM_RECORD); source.setEstimatedOutputSize(SIZE); Assert.assertEquals(SIZE, channel.getEstimatedOutputSize()); Assert.assertEquals(NUM_RECORD, channel.getEstimatedNumRecords()); }
@Test public void testGetEstimatesWithReplicationFactor() { final long NUM_RECORD = 1001; final long SIZE = 467131; final int REPLICATION = 23; DataSourceNode source = getSourceNode(); SourcePlanNode planNode = new SourcePlanNode(source, "test node"); Channel channel = new Channel(planNode); channel.setReplicationFactor(REPLICATION); // no estimates here Assert.assertEquals(-1, channel.getEstimatedOutputSize()); Assert.assertEquals(-1, channel.getEstimatedNumRecords()); // set estimates source.setEstimatedNumRecords(NUM_RECORD); source.setEstimatedOutputSize(SIZE); Assert.assertEquals(SIZE * REPLICATION, channel.getEstimatedOutputSize()); Assert.assertEquals(NUM_RECORD * REPLICATION, channel.getEstimatedNumRecords()); }
@Test public void testSingleInputOperatorsChainOfThree() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Source");
@Test public void testSingleInputOperatorsWithReCreation() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Source");
@Test public void testTwoOperatorsBothDependent() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Partial Solution");
@Test public void testTwoOperatorsOneIndependent() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Partial Solution"); SourcePlanNode source = new SourcePlanNode(getSourceNode(), "Other Source");
@Test public void testSingleInputOperators() { try { SourcePlanNode target = new SourcePlanNode(getSourceNode(), "Source");
SourcePlanNode candidate = new SourcePlanNode(this, "DataSource ("+this.getOperator().getName()+")", this.gprops, this.lprops);
SourcePlanNode candidate = new SourcePlanNode(this, "DataSource ("+this.getOperator().getName()+")", this.gprops, this.lprops);
SourcePlanNode candidate = new SourcePlanNode(this, "DataSource ("+this.getOperator().getName()+")", this.gprops, this.lprops);
SourcePlanNode candidate = new SourcePlanNode(this, "DataSource ("+this.getOperator().getName()+")", this.gprops, this.lprops);