Class AdaptiveGraphManager
java.lang.Object
org.apache.flink.streaming.api.graph.AdaptiveGraphManager
- All Implemented Interfaces:
AdaptiveGraphGenerator,StreamGraphContext.StreamGraphUpdateListener
@Internal
public class AdaptiveGraphManager
extends Object
implements AdaptiveGraphGenerator, StreamGraphContext.StreamGraphUpdateListener
Default implementation for
AdaptiveGraphGenerator.-
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveGraphManager(ClassLoader userClassloader, StreamGraph streamGraph, Executor serializationExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFinishedStreamNodeIds(List<Integer> finishedStreamNodeIds) findVertexByStreamNodeId(int streamNodeId) Retrieves the JobGraph representation of the current state of the Flink job.getOutputStreamEdges(IntermediateDataSetID intermediateDataSetId) Retrieves the stream edges that subscribe to the IntermediateDataSet.intRetrieves the number of operators that have not yet been converted to job vertex.getProducerStreamNodeId(IntermediateDataSetID intermediateDataSetId) Retrieves the ID of the stream node that produces the IntermediateDataSet.Retrieves the StreamGraphContext which provides a read-only view of the StreamGraph and methods to modify its StreamEdges and StreamNodes.getStreamNodeForwardGroupByVertexId(JobVertexID jobVertexId) Retrieves the StreamNodeForwardGroup which provides a stream node level ForwardGroup.getStreamNodeIdsByJobVertexId(JobVertexID jobVertexId) Retrieves the IDs of stream nodes that belong to the given job vertex.onJobVertexFinished(JobVertexID finishedJobVertexId) Responds to notifications that a JobVertex has completed execution.voidThis method is called whenever the StreamGraph is updated.
-
Constructor Details
-
AdaptiveGraphManager
public AdaptiveGraphManager(ClassLoader userClassloader, StreamGraph streamGraph, Executor serializationExecutor)
-
-
Method Details
-
getJobGraph
Description copied from interface:AdaptiveGraphGeneratorRetrieves the JobGraph representation of the current state of the Flink job.- Specified by:
getJobGraphin interfaceAdaptiveGraphGenerator- Returns:
- The
JobGraphinstance.
-
getStreamGraphContext
Description copied from interface:AdaptiveGraphGeneratorRetrieves the StreamGraphContext which provides a read-only view of the StreamGraph and methods to modify its StreamEdges and StreamNodes.- Specified by:
getStreamGraphContextin interfaceAdaptiveGraphGenerator- Returns:
- an instance of
StreamGraphContext.
-
onJobVertexFinished
Description copied from interface:AdaptiveGraphGeneratorResponds to notifications that a JobVertex has completed execution. This method generates new job vertices, incorporates them into the JobGraph, and returns a list of the newly created JobVertex instances.- Specified by:
onJobVertexFinishedin interfaceAdaptiveGraphGenerator- Parameters:
finishedJobVertexId- The ID of the completed JobVertex.- Returns:
- A list of the newly added
JobVertexinstances to the JobGraph.
-
addFinishedStreamNodeIds
-
getStreamNodeForwardGroupByVertexId
Retrieves the StreamNodeForwardGroup which provides a stream node level ForwardGroup.- Parameters:
jobVertexId- The ID of the JobVertex.- Returns:
- An instance of
StreamNodeForwardGroup.
-
getPendingOperatorsCount
public int getPendingOperatorsCount()Retrieves the number of operators that have not yet been converted to job vertex.- Returns:
- The number of unconverted operators.
-
getStreamNodeIdsByJobVertexId
Retrieves the IDs of stream nodes that belong to the given job vertex.- Parameters:
jobVertexId- The ID of the JobVertex.- Returns:
- A list of IDs of stream nodes that belong to the job vertex.
-
getProducerStreamNodeId
Retrieves the ID of the stream node that produces the IntermediateDataSet.- Parameters:
intermediateDataSetId- The ID of the IntermediateDataSet.- Returns:
- The ID of the stream node that produces the IntermediateDataSet.
-
getOutputStreamEdges
Retrieves the stream edges that subscribe to the IntermediateDataSet.- Parameters:
intermediateDataSetId- the ID of the IntermediateDataSet- Returns:
- the stream edges that subscribe to the IntermediateDataSet
-
findVertexByStreamNodeId
-
getStreamGraphJson
-
onStreamGraphUpdated
public void onStreamGraphUpdated()Description copied from interface:StreamGraphContext.StreamGraphUpdateListenerThis method is called whenever the StreamGraph is updated.- Specified by:
onStreamGraphUpdatedin interfaceStreamGraphContext.StreamGraphUpdateListener
-