Class DefaultExecutionTopology
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.adapter.DefaultExecutionTopology
-
- All Implemented Interfaces:
SchedulingTopology,BaseTopology<ExecutionVertexID,IntermediateResultPartitionID,SchedulingExecutionVertex,SchedulingResultPartition>,Topology<ExecutionVertexID,IntermediateResultPartitionID,SchedulingExecutionVertex,SchedulingResultPartition,SchedulingPipelinedRegion>
public class DefaultExecutionTopology extends Object implements SchedulingTopology
Adapter ofExecutionGraphtoSchedulingTopology.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<JobVertexID,DefaultLogicalPipelinedRegion>computeLogicalPipelinedRegionsByJobVertexId(List<JobVertex> topologicallySortedJobVertices)static DefaultExecutionTopologyfromExecutionGraph(DefaultExecutionGraph executionGraph)Iterable<DefaultSchedulingPipelinedRegion>getAllPipelinedRegions()Returns all pipelined regions in this topology.EdgeManagergetEdgeManager()DefaultSchedulingPipelinedRegiongetPipelinedRegionOfVertex(ExecutionVertexID vertexId)The pipelined region for a specified vertex.org.apache.flink.runtime.scheduler.adapter.DefaultResultPartitiongetResultPartition(IntermediateResultPartitionID intermediateResultPartitionId)Looks up theSchedulingResultPartitionfor the givenIntermediateResultPartitionID.org.apache.flink.runtime.scheduler.adapter.DefaultExecutionVertexgetVertex(ExecutionVertexID executionVertexId)Looks up theSchedulingExecutionVertexfor the givenExecutionVertexID.Iterable<org.apache.flink.runtime.scheduler.adapter.DefaultExecutionVertex>getVertices()Returns an iterable over all vertices, topologically sorted.voidnotifyExecutionGraphUpdatedWithInitializedJobVertices(DefaultExecutionGraph executionGraph, List<ExecutionJobVertex> newlyInitializedJobVertices)voidnotifyExecutionGraphUpdatedWithNewJobVertices(List<JobVertex> topologicallySortedJobVertices)voidregisterSchedulingTopologyListener(SchedulingTopologyListener listener)Register a scheduling topology listener.
-
-
-
Method Detail
-
getVertices
public Iterable<org.apache.flink.runtime.scheduler.adapter.DefaultExecutionVertex> getVertices()
Description copied from interface:BaseTopologyReturns an iterable over all vertices, topologically sorted.- Specified by:
getVerticesin interfaceBaseTopology<ExecutionVertexID,IntermediateResultPartitionID,SchedulingExecutionVertex,SchedulingResultPartition>- Returns:
- topologically sorted iterable over all vertices
-
getVertex
public org.apache.flink.runtime.scheduler.adapter.DefaultExecutionVertex getVertex(ExecutionVertexID executionVertexId)
Description copied from interface:SchedulingTopologyLooks up theSchedulingExecutionVertexfor the givenExecutionVertexID.- Specified by:
getVertexin interfaceSchedulingTopology- Parameters:
executionVertexId- identifying the respective scheduling vertex- Returns:
- The respective scheduling vertex
-
getResultPartition
public org.apache.flink.runtime.scheduler.adapter.DefaultResultPartition getResultPartition(IntermediateResultPartitionID intermediateResultPartitionId)
Description copied from interface:SchedulingTopologyLooks up theSchedulingResultPartitionfor the givenIntermediateResultPartitionID.- Specified by:
getResultPartitionin interfaceSchedulingTopology- Parameters:
intermediateResultPartitionId- identifying the respective scheduling result partition- Returns:
- The respective scheduling result partition
-
registerSchedulingTopologyListener
public void registerSchedulingTopologyListener(SchedulingTopologyListener listener)
Description copied from interface:SchedulingTopologyRegister a scheduling topology listener. The listener will be notified bySchedulingTopologyListener.notifySchedulingTopologyUpdated(SchedulingTopology, List)when the scheduling topology is updated.- Specified by:
registerSchedulingTopologyListenerin interfaceSchedulingTopology- Parameters:
listener- the registered listener.
-
getAllPipelinedRegions
public Iterable<DefaultSchedulingPipelinedRegion> getAllPipelinedRegions()
Description copied from interface:TopologyReturns all pipelined regions in this topology.- Specified by:
getAllPipelinedRegionsin interfaceTopology<ExecutionVertexID,IntermediateResultPartitionID,SchedulingExecutionVertex,SchedulingResultPartition,SchedulingPipelinedRegion>- Returns:
- Iterable over pipelined regions in this topology
-
getPipelinedRegionOfVertex
public DefaultSchedulingPipelinedRegion getPipelinedRegionOfVertex(ExecutionVertexID vertexId)
Description copied from interface:TopologyThe pipelined region for a specified vertex.- Specified by:
getPipelinedRegionOfVertexin interfaceTopology<ExecutionVertexID,IntermediateResultPartitionID,SchedulingExecutionVertex,SchedulingResultPartition,SchedulingPipelinedRegion>- Parameters:
vertexId- the vertex id identifying the vertex for which the pipelined region should be returned- Returns:
- the pipelined region of the vertex
-
getEdgeManager
public EdgeManager getEdgeManager()
-
computeLogicalPipelinedRegionsByJobVertexId
public static Map<JobVertexID,DefaultLogicalPipelinedRegion> computeLogicalPipelinedRegionsByJobVertexId(List<JobVertex> topologicallySortedJobVertices)
-
notifyExecutionGraphUpdatedWithNewJobVertices
public void notifyExecutionGraphUpdatedWithNewJobVertices(List<JobVertex> topologicallySortedJobVertices)
-
notifyExecutionGraphUpdatedWithInitializedJobVertices
public void notifyExecutionGraphUpdatedWithInitializedJobVertices(DefaultExecutionGraph executionGraph, List<ExecutionJobVertex> newlyInitializedJobVertices)
-
fromExecutionGraph
public static DefaultExecutionTopology fromExecutionGraph(DefaultExecutionGraph executionGraph)
-
-