Package org.apache.flink.api.java

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


     
      {
        ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
        env.setDegreeOfParallelism(64);
       
        DataSet<Long> initialSource = env.generateSequence(1, 10);
       
        Configuration conf= new Configuration();
        conf.setString(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_NESTEDLOOP_STREAMED_OUTER_FIRST);
        initialSource
          .map(new IdentityMapper<Long>())
View Full Code Here


     
      {
        ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
        env.setDegreeOfParallelism(64);
       
        DataSet<Long> initialSource = env.generateSequence(1, 10);
       
        Configuration conf= new Configuration();
        conf.setString(PactCompiler.HINT_LOCAL_STRATEGY, PactCompiler.HINT_LOCAL_STRATEGY_NESTEDLOOP_STREAMED_OUTER_SECOND);
        initialSource
          .map(new IdentityMapper<Long>())
View Full Code Here

  public void testSolutionSetDeltaDependsOnBroadcastVariable() {
    try {
      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
     
      DataSet<Tuple2<Long, Long>> source =
            env.generateSequence(1, 1000).map(new DuplicateValueScalar<Long>());
     
      DataSet<Tuple2<Long, Long>> invariantInput =
          env.generateSequence(1, 1000).map(new DuplicateValueScalar<Long>());
     
      // iteration from here
View Full Code Here

     
      DataSet<Tuple2<Long, Long>> source =
            env.generateSequence(1, 1000).map(new DuplicateValueScalar<Long>());
     
      DataSet<Tuple2<Long, Long>> invariantInput =
          env.generateSequence(1, 1000).map(new DuplicateValueScalar<Long>());
     
      // iteration from here
      DeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iter = source.iterateDelta(source, 1000, 1);
     
      DataSet<Tuple2<Long, Long>> result =
View Full Code Here

  public void testIdentityIteration() {
    try {
      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(43);
     
      IterativeDataSet<Long> iteration = env.generateSequence(-4, 1000).iterate(100);
      iteration.closeWith(iteration).print();
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
View Full Code Here

  public void testEmptyWorksetIteration() {
    try {
      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(43);
     
      DataSet<Tuple2<Long, Long>> input = env.generateSequence(1, 20)
          .map(new MapFunction<Long, Tuple2<Long, Long>>() {
            @Override
            public Tuple2<Long, Long> map(Long value){ return null; }
          });
         
View Full Code Here

  public void testIterationWithUnionRoot() {
    try {
      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(43);
     
      IterativeDataSet<Long> iteration = env.generateSequence(-4, 1000).iterate(100);
     
      iteration.closeWith(
          iteration.map(new IdentityMapper<Long>()).union(iteration.map(new IdentityMapper<Long>())))
          .print();
     
View Full Code Here

  public void testWorksetIterationWithUnionRoot() {
    try {
      ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
      env.setDegreeOfParallelism(43);
     
      DataSet<Tuple2<Long, Long>> input = env.generateSequence(1, 20)
          .map(new MapFunction<Long, Tuple2<Long, Long>>() {
            @Override
            public Tuple2<Long, Long> map(Long value){ return null; }
          });
         
View Full Code Here

 
 
  private DualInputPlanNode createPlanAndGetJoinNode(JoinHint hint) {
    ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
   
    DataSet<Long> i1 = env.generateSequence(1, 1000);
    DataSet<Long> i2 = env.generateSequence(1, 1000);
   
    i1.join(i2, hint).where(new IdentityKeySelector<Long>()).equalTo(new IdentityKeySelector<Long>()).print();
   
    Plan plan = env.createProgramPlan();
View Full Code Here

 
  private DualInputPlanNode createPlanAndGetJoinNode(JoinHint hint) {
    ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
   
    DataSet<Long> i1 = env.generateSequence(1, 1000);
    DataSet<Long> i2 = env.generateSequence(1, 1000);
   
    i1.join(i2, hint).where(new IdentityKeySelector<Long>()).equalTo(new IdentityKeySelector<Long>()).print();
   
    Plan plan = env.createProgramPlan();
   
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.