Class AdaptiveExecutionPlanSchedulingContext
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.adaptivebatch.AdaptiveExecutionPlanSchedulingContext
-
- All Implemented Interfaces:
ExecutionPlanSchedulingContext
public class AdaptiveExecutionPlanSchedulingContext extends Object implements ExecutionPlanSchedulingContext
TheAdaptiveExecutionPlanSchedulingContext
class implements theExecutionPlanSchedulingContext
interface to provide a dynamic scheduling context that adapts execution plans based on runtime conditions.
-
-
Constructor Summary
Constructors Constructor Description AdaptiveExecutionPlanSchedulingContext(AdaptiveGraphManager adaptiveGraphManager, int defaultMaxParallelism)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getConsumersMaxParallelism(Function<JobVertexID,Integer> executionJobVertexMaxParallelismRetriever, IntermediateDataSet intermediateDataSet)
Retrieves the maximum parallelism of consumers connected to the specified intermediate data set.int
getConsumersParallelism(Function<JobVertexID,Integer> executionJobVertexParallelismRetriever, IntermediateDataSet intermediateDataSet)
Retrieves the parallelism of consumers connected to the specified intermediate data set.int
getPendingOperatorCount()
Retrieves the count of pending operators waiting to be transferred to job vertices.String
getStreamGraphJson()
Retrieves the JSON representation of the stream graph for the original job.
-
-
-
Constructor Detail
-
AdaptiveExecutionPlanSchedulingContext
public AdaptiveExecutionPlanSchedulingContext(AdaptiveGraphManager adaptiveGraphManager, int defaultMaxParallelism)
-
-
Method Detail
-
getConsumersParallelism
public int getConsumersParallelism(Function<JobVertexID,Integer> executionJobVertexParallelismRetriever, IntermediateDataSet intermediateDataSet)
Description copied from interface:ExecutionPlanSchedulingContext
Retrieves the parallelism of consumers connected to the specified intermediate data set.- Specified by:
getConsumersParallelism
in interfaceExecutionPlanSchedulingContext
- Parameters:
executionJobVertexParallelismRetriever
- A function that retrieves the parallelism of a job vertex.intermediateDataSet
- The intermediate data set whose consumer parallelism is queried.- Returns:
- The parallelism of the consumers.
-
getConsumersMaxParallelism
public int getConsumersMaxParallelism(Function<JobVertexID,Integer> executionJobVertexMaxParallelismRetriever, IntermediateDataSet intermediateDataSet)
Description copied from interface:ExecutionPlanSchedulingContext
Retrieves the maximum parallelism of consumers connected to the specified intermediate data set.- Specified by:
getConsumersMaxParallelism
in interfaceExecutionPlanSchedulingContext
- Parameters:
executionJobVertexMaxParallelismRetriever
- A function that retrieves the maximum parallelism of a job vertex.intermediateDataSet
- The intermediate data set whose consumer maximum parallelism is queried.- Returns:
- The maximum parallelism of the consumers.
-
getPendingOperatorCount
public int getPendingOperatorCount()
Description copied from interface:ExecutionPlanSchedulingContext
Retrieves the count of pending operators waiting to be transferred to job vertices.- Specified by:
getPendingOperatorCount
in interfaceExecutionPlanSchedulingContext
- Returns:
- the number of pending operators.
-
getStreamGraphJson
public String getStreamGraphJson()
Description copied from interface:ExecutionPlanSchedulingContext
Retrieves the JSON representation of the stream graph for the original job.- Specified by:
getStreamGraphJson
in interfaceExecutionPlanSchedulingContext
- Returns:
- the JSON representation of the stream graph, or null if the stream graph is not available.
-
-