Interface AdaptiveExecutionHandler
-
- All Known Implementing Classes:
DefaultAdaptiveExecutionHandler,NonAdaptiveExecutionHandler
public interface AdaptiveExecutionHandlerTheAdaptiveExecutionHandlerinterface defines the operations for handling the adaptive execution of batch jobs. This includes acquiring the current job graph and dynamically adjusting the job topology in response to job events.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getJobGraph
JobGraph getJobGraph()
Returns theJobGraphrepresenting the batch job.- Returns:
- the JobGraph.
-
handleJobEvent
void handleJobEvent(JobEvent jobEvent)
Handles the providedJobEvent, attempting dynamic modifications to theStreamGraphbased on the specifics of the job event.- Parameters:
jobEvent- The job event to handle. This event contains the necessary information that might trigger adjustments to the StreamGraph.
-
registerJobGraphUpdateListener
void registerJobGraphUpdateListener(JobGraphUpdateListener listener)
Registers a listener to receive updates when theJobGraphis modified.- Parameters:
listener- the listener to register for JobGraph updates.
-
getInitialParallelism
int getInitialParallelism(JobVertexID jobVertexId)
Retrieves the initial parallelism for a given JobVertex ID.- Parameters:
jobVertexId- the JobVertex ID.- Returns:
- the corresponding initial parallelism.
-
notifyJobVertexParallelismDecided
void notifyJobVertexParallelismDecided(JobVertexID jobVertexId, int parallelism)
Notifies the handler that the parallelism of a JobVertex has been decided.- Parameters:
jobVertexId- the identifier of the JobVertex whose parallelism was decided.parallelism- the decided parallelism of the JobVertex.
-
createExecutionPlanSchedulingContext
ExecutionPlanSchedulingContext createExecutionPlanSchedulingContext(int defaultMaxParallelism)
Creates an instance ofExecutionPlanSchedulingContext.- Parameters:
defaultMaxParallelism- the default value for maximum parallelism.- Returns:
- an instance of
ExecutionPlanSchedulingContext.
-
-