Package org.apache.flink.compiler.dag

Examples of org.apache.flink.compiler.dag.DataSourceNode


  }
 
  // --------------------------------------------------------------------------------------------
 
  private static final DataSourceNode getSourceNode() {
    return new DataSourceNode(new GenericDataSourceBase<String, TextInputFormat>(new TextInputFormat(new Path("/")), new OperatorInformation<String>(BasicTypeInfo.STRING_TYPE_INFO)));
  }
View Full Code Here


        DataSinkNode dsn = new DataSinkNode((GenericDataSinkBase<?>) c);
        this.sinks.add(dsn);
        n = dsn;
      }
      else if (c instanceof GenericDataSourceBase) {
        DataSourceNode dsn = new DataSourceNode((GenericDataSourceBase<?, ?>) c);
        this.sources.add(dsn);
        n = dsn;
      }
      else if (c instanceof MapOperatorBase) {
        n = new MapNode((MapOperatorBase<?, ?, ?>) c);
View Full Code Here

  @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());
  }
View Full Code Here

    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());
  }
View Full Code Here

//        new UnaryOperatorInformation<String, String>(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO),
//        "map"));
//  }
 
  private static final DataSourceNode getSourceNode() {
    return new DataSourceNode(new GenericDataSourceBase<String, TextInputFormat>(
        new TextInputFormat(new Path("/ignored")),
        new OperatorInformation<String>(BasicTypeInfo.STRING_TYPE_INFO),
        "source"));
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.compiler.dag.DataSourceNode

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.