if (this.skipCollectionExecution()) { return; preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
isCollectionExecution = false; startCluster(); preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit(); stopCluster(); TestEnvironment.unsetAsContext();
public void setParallelism(int parallelism) { this.parallelism = parallelism; setTaskManagerNumSlots(parallelism); }
@Override protected void testProgram() throws Exception { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(1); // Sc1 generates M parameters a,b,c for second degree polynomials P(x) = ax^2 + bx + c identified by id DataSet<Tuple4<String, Integer, Integer, Integer>> sc1 = env .fromElements(new Tuple4<>("1", 61, 6, 29), new Tuple4<>("2", 7, 13, 10), new Tuple4<>("3", 8, 13, 27)); // Sc2 generates N x values to be evaluated with the polynomial identified by id DataSet<Tuple2<String, Integer>> sc2 = env .fromElements(new Tuple2<>("1", 5), new Tuple2<>("2", 3), new Tuple2<>("3", 6)); // Sc3 generates N y values to be evaluated with the polynomial identified by id DataSet<Tuple2<String, Integer>> sc3 = env .fromElements(new Tuple2<>("1", 2), new Tuple2<>("2", 3), new Tuple2<>("3", 7)); // Jn1 matches x and y values on id and emits (id, x, y) triples JoinOperator<Tuple2<String, Integer>, Tuple2<String, Integer>, Tuple3<String, Integer, Integer>> jn1 = sc2.join(sc3).where(0).equalTo(0).with(new Jn1()); // Jn2 matches polynomial and arguments by id, computes p = min(P(x),P(y)) and emits (id, p) tuples JoinOperator<Tuple3<String, Integer, Integer>, Tuple4<String, Integer, Integer, Integer>, Tuple2<String, Integer>> jn2 = jn1.join(sc1).where(0).equalTo(0).with(new Jn2()); // Mp1 selects (id, x, y) triples where x = y and broadcasts z (=x=y) to Mp2 FlatMapOperator<Tuple3<String, Integer, Integer>, Tuple2<String, Integer>> mp1 = jn1.flatMap(new Mp1()); // Mp2 filters out all p values which can be divided by z List<Tuple2<String, Integer>> result = jn2.flatMap(new Mp2()).withBroadcastSet(mp1, "z").collect(); JavaProgramTestBase.compareResultAsText(result, RESULT); }
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
isCollectionExecution = false; startCluster(); try { preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit(); stopCluster(); TestEnvironment.unsetAsContext();
public JavaProgramTestBase(Configuration config) { super(config); setTaskManagerNumSlots(parallelism); }
if (this.skipCollectionExecution()) { return; preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
if(this.skipCollectionExecution()) { return; preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
if (this.skipCollectionExecution()) { return; preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
if (this.skipCollectionExecution()) { return; preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();
preSubmit(); testProgram(); this.latestExecutionResult = env.getLastJobExecutionResult(); postSubmit();