public class StreamGraph
extends org.apache.flink.optimizer.plan.StreamingPlan
| Modifier and Type | Class and Description |
|---|---|
static class |
StreamGraph.ResourceStrategy |
static class |
StreamGraph.StreamLoop
Object for representing loops in streaming programs.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,StreamGraph.StreamLoop> |
vertexIDtoLoop |
| Constructor and Description |
|---|
StreamGraph(StreamExecutionEnvironment environment) |
| Modifier and Type | Method and Description |
|---|---|
<IN1,IN2,OUT> |
addCoOperator(Integer vertexID,
TwoInputStreamOperator<IN1,IN2,OUT> taskoperatorObject,
org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo,
String operatorName) |
void |
addEdge(Integer upStreamVertexID,
Integer downStreamVertexID,
StreamPartitioner<?> partitionerObject,
int typeNumber,
List<String> outputNames) |
void |
addIterationHead(Integer sourceID,
Integer iterationHead,
Integer iterationID,
long timeOut) |
void |
addIterationTail(Integer sinkID,
Integer iterationTail,
Integer iterationID,
long waitTime) |
protected StreamNode |
addNode(Integer vertexID,
Class<? extends org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable> vertexClass,
StreamOperator<?> operatorObject,
String operatorName) |
<IN,OUT> void |
addOperator(Integer vertexID,
StreamOperator<OUT> operatorObject,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo,
String operatorName) |
<T> void |
addOutputSelector(Integer vertexID,
OutputSelector<T> outputSelector) |
<IN,OUT> void |
addSource(Integer vertexID,
StreamOperator<OUT> operatorObject,
org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInfo,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo,
String operatorName) |
void |
clear()
Remove all registered nodes etc.
|
void |
dumpStreamingPlanAsJSON(File file) |
void |
forceCheckpoint() |
long |
getCheckpointingInterval() |
protected org.apache.flink.api.common.ExecutionConfig |
getExecutionConfig() |
org.apache.flink.runtime.jobgraph.JobGraph |
getJobGraph()
Gets the assembled
JobGraph and adds a default name for it. |
org.apache.flink.runtime.jobgraph.JobGraph |
getJobGraph(String jobGraphName)
Gets the assembled
JobGraph and adds a user specified name for
it. |
Integer |
getLoopID(Integer vertexID) |
long |
getLoopTimeout(Integer vertexID) |
Set<org.apache.flink.api.java.tuple.Tuple2<Integer,StreamOperator<?>>> |
getOperators() |
Collection<Integer> |
getSourceIDs() |
org.apache.flink.runtime.state.StateHandleProvider<?> |
getStateHandleProvider() |
StreamEdge |
getStreamEdge(int sourceId,
int targetId) |
String |
getStreamingPlanAsJSON() |
Collection<StreamGraph.StreamLoop> |
getStreamLoops() |
StreamNode |
getStreamNode(Integer vertexID) |
Collection<StreamNode> |
getStreamNodes() |
protected Collection<? extends Integer> |
getVertexIDs() |
boolean |
isChainingEnabled() |
boolean |
isCheckpointingEnabled() |
boolean |
isIterative() |
protected void |
removeEdge(StreamEdge edge) |
protected void |
removeVertex(StreamNode toRemove) |
void |
setBufferTimeout(Integer vertexID,
long bufferTimeout) |
void |
setChaining(boolean chaining) |
void |
setCheckpointingEnabled(boolean checkpointingEnabled) |
void |
setCheckpointingInterval(long checkpointingInterval) |
void |
setInputFormat(Integer vertexID,
org.apache.flink.api.common.io.InputFormat<?,?> inputFormat) |
void |
setJobName(String jobName) |
<IN,OUT> void |
setOperator(Integer vertexID,
StreamOperator<OUT> operatorObject) |
<OUT> void |
setOutType(Integer vertexID,
org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outType) |
void |
setParallelism(Integer vertexID,
int parallelism) |
void |
setResourceStrategy(Integer vertexID,
StreamGraph.ResourceStrategy strategy) |
void |
setStateHandleProvider(org.apache.flink.runtime.state.StateHandleProvider<?> provider) |
protected Map<Integer,StreamGraph.StreamLoop> vertexIDtoLoop
public StreamGraph(StreamExecutionEnvironment environment)
public void clear()
protected org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
public void setJobName(String jobName)
public void setChaining(boolean chaining)
public void setCheckpointingEnabled(boolean checkpointingEnabled)
public void setCheckpointingInterval(long checkpointingInterval)
public void forceCheckpoint()
public void setStateHandleProvider(org.apache.flink.runtime.state.StateHandleProvider<?> provider)
public org.apache.flink.runtime.state.StateHandleProvider<?> getStateHandleProvider()
public long getCheckpointingInterval()
public boolean isChainingEnabled()
public boolean isCheckpointingEnabled()
public boolean isIterative()
public <IN,OUT> void addSource(Integer vertexID, StreamOperator<OUT> operatorObject, org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInfo, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo, String operatorName)
public <IN,OUT> void addOperator(Integer vertexID, StreamOperator<OUT> operatorObject, org.apache.flink.api.common.typeinfo.TypeInformation<IN> inTypeInfo, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo, String operatorName)
public <IN1,IN2,OUT> void addCoOperator(Integer vertexID, TwoInputStreamOperator<IN1,IN2,OUT> taskoperatorObject, org.apache.flink.api.common.typeinfo.TypeInformation<IN1> in1TypeInfo, org.apache.flink.api.common.typeinfo.TypeInformation<IN2> in2TypeInfo, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo, String operatorName)
public void addIterationHead(Integer sourceID, Integer iterationHead, Integer iterationID, long timeOut)
public void addIterationTail(Integer sinkID, Integer iterationTail, Integer iterationID, long waitTime)
protected StreamNode addNode(Integer vertexID, Class<? extends org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable> vertexClass, StreamOperator<?> operatorObject, String operatorName)
public void addEdge(Integer upStreamVertexID, Integer downStreamVertexID, StreamPartitioner<?> partitionerObject, int typeNumber, List<String> outputNames)
public <T> void addOutputSelector(Integer vertexID, OutputSelector<T> outputSelector)
public void setParallelism(Integer vertexID, int parallelism)
public void setBufferTimeout(Integer vertexID, long bufferTimeout)
public <OUT> void setOutType(Integer vertexID, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outType)
public <IN,OUT> void setOperator(Integer vertexID, StreamOperator<OUT> operatorObject)
public void setInputFormat(Integer vertexID, org.apache.flink.api.common.io.InputFormat<?,?> inputFormat)
public void setResourceStrategy(Integer vertexID, StreamGraph.ResourceStrategy strategy)
public StreamNode getStreamNode(Integer vertexID)
protected Collection<? extends Integer> getVertexIDs()
public StreamEdge getStreamEdge(int sourceId, int targetId)
public Collection<Integer> getSourceIDs()
public Collection<StreamNode> getStreamNodes()
public Set<org.apache.flink.api.java.tuple.Tuple2<Integer,StreamOperator<?>>> getOperators()
public Collection<StreamGraph.StreamLoop> getStreamLoops()
public long getLoopTimeout(Integer vertexID)
protected void removeEdge(StreamEdge edge)
protected void removeVertex(StreamNode toRemove)
public org.apache.flink.runtime.jobgraph.JobGraph getJobGraph()
JobGraph and adds a default name for it.getJobGraph in class org.apache.flink.optimizer.plan.StreamingPlanpublic org.apache.flink.runtime.jobgraph.JobGraph getJobGraph(String jobGraphName)
JobGraph and adds a user specified name for
it.jobGraphName - name of the jobGraphpublic String getStreamingPlanAsJSON()
getStreamingPlanAsJSON in class org.apache.flink.optimizer.plan.StreamingPlanpublic void dumpStreamingPlanAsJSON(File file) throws IOException
dumpStreamingPlanAsJSON in class org.apache.flink.optimizer.plan.StreamingPlanIOExceptionCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.