Package eu.stratosphere.api.common

Examples of eu.stratosphere.api.common.Plan


     
      @SuppressWarnings("unchecked")
      DataSet<Tuple3<Long, String, Integer>> input = env.fromElements(new Tuple3<Long, String, Integer>(3l, "test", 42));
      input.map(new IndividualConstantMapper<Long, String, Integer>()).print();
     
      Plan plan = env.createProgramPlan();
     
      GenericDataSinkBase<?> sink = plan.getDataSinks().iterator().next();
      MapOperatorBase<?, ?, ?> mapper = (MapOperatorBase<?, ?, ?>) sink.getInput();
     
      SingleInputSemanticProperties semantics = mapper.getSemanticProperties();
     
      FieldSet fw1 = semantics.getForwardedField(0);
View Full Code Here


        .name("Count Words")
        .build();
    HadoopDataSink<Text, IntWritable> out = new HadoopDataSink<Text, IntWritable>(new TextOutputFormat<Text, IntWritable>(),new JobConf(), "Hadoop TextOutputFormat", reducer, Text.class, IntWritable.class);
    TextOutputFormat.setOutputPath(out.getJobConf(), new Path(output));

    Plan plan = new Plan(out, "Hadoop OutputFormat Example");
    plan.setDefaultParallelism(numSubTasks);
    return plan;
  }
View Full Code Here

      DataSet<Tuple2<Long, Double>> input2 = env.fromElements(new Tuple2<Long, Double>(3l, 3.1415));
     
      input1.join(input2).where(0).equalTo(0).with(new ForwardingTupleJoin<Long, String, Long, Double>())
        .print();
     
      Plan plan = env.createProgramPlan();
     
      GenericDataSinkBase<?> sink = plan.getDataSinks().iterator().next();
      JoinOperatorBase<?, ?, ?, ?> join = (JoinOperatorBase<?, ?, ?, ?>) sink.getInput();
     
      DualInputSemanticProperties semantics = join.getSemanticProperties();
     
      FieldSet fw11 = semantics.getForwardedField1(0);
View Full Code Here

    if (args.length < 3) {
      System.err.println(wc.getDescription());
      System.exit(1);
    }

    Plan plan = wc.getPlan(args);

    // This will execute the word-count embedded in a local context. replace this line by the commented
    // succeeding line to send the job to a local installation or to a cluster for execution
    LocalExecutor.execute(plan);
//    PlanExecutor ex = new RemoteExecutor("localhost", 6123, "target/pact-examples-0.4-SNAPSHOT-WordCount.jar");
View Full Code Here

      data.reduceGroup(new GroupReduceFunction<Double, Double>() {
        public void reduce(Iterator<Double> values, Collector<Double> out) {}
      }).name("reducer")
      .print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
     
View Full Code Here

      }).name("reducer");
     
      reduced.setCombinable(true);
      reduced.print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
      // get the original nodes
View Full Code Here

        .reduceGroup(new GroupReduceFunction<Tuple2<String, Double>, Tuple2<String, Double>>() {
        public void reduce(Iterator<Tuple2<String, Double>> values, Collector<Tuple2<String, Double>> out) {}
      }).name("reducer")
      .print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
      // get the original nodes
View Full Code Here

      }).name("reducer");
     
      reduced.setCombinable(true);
      reduced.print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
      // get the original nodes
View Full Code Here

        .reduceGroup(new GroupReduceFunction<Tuple2<String, Double>, Tuple2<String, Double>>() {
        public void reduce(Iterator<Tuple2<String, Double>> values, Collector<Tuple2<String, Double>> out) {}
      }).name("reducer")
      .print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
      // get the original nodes
View Full Code Here

      }).name("reducer");
     
      reduced.setCombinable(true);
      reduced.print().name("sink");
     
      Plan p = env.createProgramPlan();
      OptimizedPlan op = compileNoStats(p);
     
      OptimizerPlanNodeResolver resolver = getOptimizerPlanNodeResolver(op);
     
      // get the original nodes
View Full Code Here

TOP

Related Classes of eu.stratosphere.api.common.Plan

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.