Class NonAdaptiveExecutionHandler
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.adaptivebatch.NonAdaptiveExecutionHandler
-
- All Implemented Interfaces:
AdaptiveExecutionHandler
public class NonAdaptiveExecutionHandler extends Object implements AdaptiveExecutionHandler
ANonAdaptiveExecutionHandler
implements theAdaptiveExecutionHandler
interface 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 ExecutionPlanSchedulingContext
createExecutionPlanSchedulingContext(int defaultMaxParallelism)
Creates an instance ofExecutionPlanSchedulingContext
.int
getInitialParallelism(JobVertexID jobVertexId)
Retrieves the initial parallelism for a given JobVertex ID.JobGraph
getJobGraph()
Returns theJobGraph
representing the batch job.void
handleJobEvent(JobEvent jobEvent)
Handles the providedJobEvent
, attempting dynamic modifications to theStreamGraph
based on the specifics of the job event.void
notifyJobVertexParallelismDecided(JobVertexID jobVertexId, int parallelism)
Notifies the handler that the parallelism of a JobVertex has been decided.void
registerJobGraphUpdateListener(JobGraphUpdateListener listener)
Registers a listener to receive updates when theJobGraph
is modified.
-
-
-
Constructor Detail
-
NonAdaptiveExecutionHandler
public NonAdaptiveExecutionHandler(JobGraph jobGraph)
-
-
Method Detail
-
getJobGraph
public JobGraph getJobGraph()
Description copied from interface:AdaptiveExecutionHandler
Returns theJobGraph
representing the batch job.- Specified by:
getJobGraph
in interfaceAdaptiveExecutionHandler
- Returns:
- the JobGraph.
-
handleJobEvent
public void handleJobEvent(JobEvent jobEvent)
Description copied from interface:AdaptiveExecutionHandler
Handles the providedJobEvent
, attempting dynamic modifications to theStreamGraph
based on the specifics of the job event.- Specified by:
handleJobEvent
in 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:AdaptiveExecutionHandler
Registers a listener to receive updates when theJobGraph
is modified.- Specified by:
registerJobGraphUpdateListener
in interfaceAdaptiveExecutionHandler
- Parameters:
listener
- the listener to register for JobGraph updates.
-
getInitialParallelism
public int getInitialParallelism(JobVertexID jobVertexId)
Description copied from interface:AdaptiveExecutionHandler
Retrieves the initial parallelism for a given JobVertex ID.- Specified by:
getInitialParallelism
in interfaceAdaptiveExecutionHandler
- Parameters:
jobVertexId
- the JobVertex ID.- Returns:
- the corresponding initial parallelism.
-
notifyJobVertexParallelismDecided
public void notifyJobVertexParallelismDecided(JobVertexID jobVertexId, int parallelism)
Description copied from interface:AdaptiveExecutionHandler
Notifies the handler that the parallelism of a JobVertex has been decided.- Specified by:
notifyJobVertexParallelismDecided
in 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:AdaptiveExecutionHandler
Creates an instance ofExecutionPlanSchedulingContext
.- Specified by:
createExecutionPlanSchedulingContext
in interfaceAdaptiveExecutionHandler
- Parameters:
defaultMaxParallelism
- the default value for maximum parallelism.- Returns:
- an instance of
ExecutionPlanSchedulingContext
.
-
-