Java Code Examples for org.apache.flink.runtime.jobgraph.JobVertex#setInputDependencyConstraint()
The following examples show how to use
org.apache.flink.runtime.jobgraph.JobVertex#setInputDependencyConstraint() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExecutionVertexInputConstraintTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private static ExecutionGraph createExecutionGraph( List<JobVertex> orderedVertices, InputDependencyConstraint inputDependencyConstraint) throws Exception { final JobID jobId = new JobID(); final String jobName = "Test Job Sample Name"; final SlotProvider slotProvider = new SimpleSlotProvider(jobId, 20); for (JobVertex vertex : orderedVertices) { vertex.setInputDependencyConstraint(inputDependencyConstraint); } ExecutionGraph eg = new ExecutionGraph( new DummyJobInformation( jobId, jobName), TestingUtils.defaultExecutor(), TestingUtils.defaultExecutor(), AkkaUtils.getDefaultTimeout(), TestRestartStrategy.directExecuting(), new RestartAllStrategy.Factory(), slotProvider); eg.attachJobGraph(orderedVertices); return eg; }
Example 2
Source File: ExecutionVertexInputConstraintTest.java From flink with Apache License 2.0 | 6 votes |
private static ExecutionGraph createExecutionGraph( List<JobVertex> orderedVertices, InputDependencyConstraint inputDependencyConstraint) throws Exception { final JobID jobId = new JobID(); final String jobName = "Test Job Sample Name"; final SlotProvider slotProvider = new SimpleSlotProvider(jobId, 20); for (JobVertex vertex : orderedVertices) { vertex.setInputDependencyConstraint(inputDependencyConstraint); } ExecutionGraph eg = new ExecutionGraph( new DummyJobInformation( jobId, jobName), TestingUtils.defaultExecutor(), TestingUtils.defaultExecutor(), AkkaUtils.getDefaultTimeout(), TestRestartStrategy.directExecuting(), new RestartAllStrategy.Factory(), slotProvider); eg.attachJobGraph(orderedVertices); return eg; }
Example 3
Source File: ExecutionVertexInputConstraintTest.java From flink with Apache License 2.0 | 6 votes |
private static ExecutionGraph createExecutionGraph( List<JobVertex> orderedVertices, InputDependencyConstraint inputDependencyConstraint, int numSlots) throws Exception { for (JobVertex vertex : orderedVertices) { vertex.setInputDependencyConstraint(inputDependencyConstraint); } final JobGraph jobGraph = new JobGraph(orderedVertices.toArray(new JobVertex[0])); final SlotProvider slotProvider = new SimpleSlotProvider(numSlots); return TestingExecutionGraphBuilder .newBuilder() .setJobGraph(jobGraph) .setRestartStrategy(TestRestartStrategy.directExecuting()) .setSlotProvider(slotProvider) .build(); }
Example 4
Source File: DefaultSchedulerTest.java From flink with Apache License 2.0 | 5 votes |
private static JobVertex createVertexWithAllInputConstraints(String name, int parallelism) { final JobVertex v = new JobVertex(name); v.setParallelism(parallelism); v.setInvokableClass(AbstractInvokable.class); v.setInputDependencyConstraint(InputDependencyConstraint.ALL); return v; }
Example 5
Source File: ExecutionVertexInputConstraintTest.java From flink with Apache License 2.0 | 5 votes |
private static JobVertex createVertexWithAllInputConstraints(String name, int parallelism) { final JobVertex v = new JobVertex(name); v.setParallelism(parallelism); v.setInvokableClass(AbstractInvokable.class); v.setInputDependencyConstraint(InputDependencyConstraint.ALL); return v; }