Package org.apache.flink.api.java

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


    DataSet<Tuple2<Long, Double>> result = intialRanks.runOperation(
      VertexCentricIteration.withValuedEdges(edgesWithProbability,
            new VertexRankUpdater(numVertices, BETA), new RankMessenger(), 20));
   
    result.print();
    env.execute("Spargel PageRank");
  }
 
  /**
   * Function that updates the rank of a vertex by summing up the partial ranks from all incoming messages
   * and then applying the dampening formula.
View Full Code Here


    DataSet<Tuple2<Long, Long>> initialVertices = vertexIds.map(new IdAssigner());
   
    DataSet<Tuple2<Long, Long>> result = initialVertices.runOperation(VertexCentricIteration.withPlainEdges(edges, new CCUpdater(), new CCMessager(), 100));
   
    result.print();
    env.execute("Spargel Connected Components");
  }
 
  public static final class CCUpdater extends VertexUpdateFunction<Long, Long, Long> {
    @Override
    public void updateVertex(Long vertexKey, Long vertexValue, MessageIterator<Long> inMessages) {
View Full Code Here

   
   
    DataSet<Tuple2<Long, Double>> result = intialRanks.runOperation(iteration);
   
    result.print();
    env.execute("Spargel PageRank");
  }
 
  /**
   * Function that updates the rank of a vertex by summing up the partial ranks from all incoming messages
   * and then applying the dampening formula.
View Full Code Here

            .where(1)
            .equalTo(1)
            .with(new T3T5FlatJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo\n" +
            "Hello,Hallo Welt\n" +
            "Hello world,Hallo Welt\n";
View Full Code Here

               .where(0,1)
               .equalTo(0,4)
               .with(new T3T5FlatJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo\n" +
            "Hello,Hallo Welt\n" +
            "Hello world,Hallo Welt wie gehts?\n" +
View Full Code Here

            ds1.join(ds2)
               .where(0)
               .equalTo(2);
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "(1,1,Hi),(2,2,1,Hallo Welt,2)\n" +
            "(2,2,Hello),(2,3,2,Hallo Welt wie,1)\n" +
            "(3,2,Hello world),(3,4,3,Hallo Welt wie gehts?,2)\n";
View Full Code Here

                              .where(1)
                              .equalTo(1)
                              .with(new T3T5FlatJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo\n" +
            "Hello,Hallo Welt\n" +
            "Hello world,Hallo Welt\n";
View Full Code Here

               .where(1)
               .equalTo(1)
               .with(new T3T5FlatJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "Hi,Hallo\n" +
            "Hello,Hallo Welt\n" +
            "Hello world,Hallo Welt\n";
View Full Code Here

               .where(1)
               .equalTo(1)
               .with(new LeftReturningJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "1,1,Hi\n" +
            "2,2,Hello\n" +
            "3,2,Hello world\n";
View Full Code Here

               .where(1)
               .equalTo(1)
               .with(new RightReturningJoin());
       
        joinDs.writeAsCsv(resultPath);
        env.execute();
       
        // return expected result
        return "1,1,0,Hallo,1\n" +
            "2,2,1,Hallo Welt,2\n" +
            "2,2,1,Hallo Welt,2\n";
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.