Java Code Examples for org.apache.flink.optimizer.dag.DataSourceNode#setEstimatedNumRecords()
The following examples show how to use
org.apache.flink.optimizer.dag.DataSourceNode#setEstimatedNumRecords() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChannelTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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()); }
Example 2
Source File: ChannelTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@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()); }
Example 3
Source File: ChannelTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }
Example 4
Source File: ChannelTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }
Example 5
Source File: ChannelTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }
Example 6
Source File: ChannelTest.java From flink with Apache License 2.0 | 6 votes |
@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()); }