Class NonAdaptiveExecutionHandler
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.adaptivebatch.NonAdaptiveExecutionHandler
-
- All Implemented Interfaces:
AdaptiveExecutionHandler
public class NonAdaptiveExecutionHandler extends Object implements AdaptiveExecutionHandler
ANonAdaptiveExecutionHandlerimplements theAdaptiveExecutionHandlerinterface to provide an immutable static job graph.
-
-
Constructor Summary
Constructors Constructor Description NonAdaptiveExecutionHandler(JobGraph jobGraph)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionPlanSchedulingContextcreateExecutionPlanSchedulingContext(int defaultMaxParallelism)Creates an instance ofExecutionPlanSchedulingContext.intgetInitialParallelism(JobVertexID jobVertexId)Retrieves the initial parallelism for a given JobVertex ID.JobGraphgetJobGraph()Returns theJobGraphrepresenting the batch job.voidhandleJobEvent(JobEvent jobEvent)Handles the providedJobEvent, attempting dynamic modifications to theStreamGraphbased on the specifics of the job event.voidnotifyJobVertexParallelismDecided(JobVertexID jobVertexId, int parallelism)Notifies the handler that the parallelism of a JobVertex has been decided.voidregisterJobGraphUpdateListener(JobGraphUpdateListener listener)Registers a listener to receive updates when theJobGraphis modified.
-
-
-
Constructor Detail
-
NonAdaptiveExecutionHandler
public NonAdaptiveExecutionHandler(JobGraph jobGraph)
-
-
Method Detail
-
getJobGraph
public JobGraph getJobGraph()
Description copied from interface:AdaptiveExecutionHandlerReturns theJobGraphrepresenting the batch job.- Specified by:
getJobGraphin interfaceAdaptiveExecutionHandler- Returns:
- the JobGraph.
-
handleJobEvent
public void handleJobEvent(JobEvent jobEvent)
Description copied from interface:AdaptiveExecutionHandlerHandles the providedJobEvent, attempting dynamic modifications to theStreamGraphbased on the specifics of the job event.- Specified by:
handleJobEventin interfaceAdaptiveExecutionHandler- Parameters:
jobEvent- The job event to handle. This event contains the necessary information that might trigger adjustments to the StreamGraph.
-
registerJobGraphUpdateListener
public void registerJobGraphUpdateListener(JobGraphUpdateListener listener)
Description copied from interface:AdaptiveExecutionHandlerRegisters a listener to receive updates when theJobGraphis modified.- Specified by:
registerJobGraphUpdateListenerin interfaceAdaptiveExecutionHandler- Parameters:
listener- the listener to register for JobGraph updates.
-
getInitialParallelism
public int getInitialParallelism(JobVertexID jobVertexId)
Description copied from interface:AdaptiveExecutionHandlerRetrieves the initial parallelism for a given JobVertex ID.- Specified by:
getInitialParallelismin interfaceAdaptiveExecutionHandler- Parameters:
jobVertexId- the JobVertex ID.- Returns:
- the corresponding initial parallelism.
-
notifyJobVertexParallelismDecided
public void notifyJobVertexParallelismDecided(JobVertexID jobVertexId, int parallelism)
Description copied from interface:AdaptiveExecutionHandlerNotifies the handler that the parallelism of a JobVertex has been decided.- Specified by:
notifyJobVertexParallelismDecidedin interfaceAdaptiveExecutionHandler- Parameters:
jobVertexId- the identifier of the JobVertex whose parallelism was decided.parallelism- the decided parallelism of the JobVertex.
-
createExecutionPlanSchedulingContext
public ExecutionPlanSchedulingContext createExecutionPlanSchedulingContext(int defaultMaxParallelism)
Description copied from interface:AdaptiveExecutionHandlerCreates an instance ofExecutionPlanSchedulingContext.- Specified by:
createExecutionPlanSchedulingContextin interfaceAdaptiveExecutionHandler- Parameters:
defaultMaxParallelism- the default value for maximum parallelism.- Returns:
- an instance of
ExecutionPlanSchedulingContext.
-
-