Examples of fromCollection()


Examples of eu.stratosphere.api.java.ExecutionEnvironment.fromCollection()

 
  @Test
  public void testFieldsAggregate() {
   
    final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
    DataSet<Tuple5<Integer, Long, String, Long, Integer>> tupleDs = env.fromCollection(emptyTupleData, tupleTypeInfo);

    // should work
    try {
      tupleDs.aggregate(Aggregations.SUM, 1);
    } catch(Exception e) {
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

    public static String runProgram(String resultPath) throws Exception {
     
      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);
     
      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);
      int keyPosition = 0;
     
      DeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterateDelta(initialSolutionSet, MAX_ITERATIONS, keyPosition);
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

     
      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);
     
      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);
      int keyPosition = 0;
     
      DeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterateDelta(initialSolutionSet, MAX_ITERATIONS, keyPosition);
     
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

    public static String runProgram(String resultPath) throws Exception {

      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);

      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);

      IterativeDataSet<Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterate(MAX_ITERATIONS);
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);

      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);

      IterativeDataSet<Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterate(MAX_ITERATIONS);

      // register the aggregator
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

    public static String runProgram(String resultPath) throws Exception {

      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);

      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);

      IterativeDataSet<Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterate(MAX_ITERATIONS);
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

      final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(DOP);

      DataSet<Tuple2<Long, Long>> initialSolutionSet = env.fromCollection(verticesInput);
      DataSet<Tuple2<Long, Long>> edges = env.fromCollection(edgesInput);

      IterativeDataSet<Tuple2<Long, Long>> iteration =
          initialSolutionSet.iterate(MAX_ITERATIONS);

      // register the convergence criterion
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

  @Override
  protected void testProgram() throws Exception {
    ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
   
    DataSet<Tuple2<String, String>> data = env.fromCollection(input);
   
    data.mapPartition(new TestMapPartition()).output(new LocalCollectionOutputFormat<Tuple2<String,Integer>>(result));
   
    env.execute();
  }
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

 
  @Test
  public void testFieldsAggregate() {
   
    final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
    DataSet<Tuple5<Integer, Long, String, Long, Integer>> tupleDs = env.fromCollection(emptyTupleData, tupleTypeInfo);

    // should work
    try {
      tupleDs.aggregate(Aggregations.SUM, 1);
    } catch(Exception e) {
View Full Code Here

Examples of org.apache.flink.api.java.ExecutionEnvironment.fromCollection()

    } catch(Exception e) {
      Assert.fail();
    }
   
    // should not work: not applied to tuple dataset
    DataSet<Long> longDs = env.fromCollection(emptyLongData, BasicTypeInfo.LONG_TYPE_INFO);
    try {
      longDs.aggregate(Aggregations.MIN, 1);
      Assert.fail();
    } catch(InvalidProgramException uoe) {
      // we're good here
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.