Interface AdaptiveExecutionHandler

All Known Implementing Classes:
DefaultAdaptiveExecutionHandler, NonAdaptiveExecutionHandler

public interface AdaptiveExecutionHandler
The AdaptiveExecutionHandler interface 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 Details

    • getJobGraph

      JobGraph getJobGraph()
      Returns the JobGraph representing the batch job.
      Returns:
      the JobGraph.
    • handleJobEvent

      void handleJobEvent(JobEvent jobEvent)
      Handles the provided JobEvent, attempting dynamic modifications to the StreamGraph based 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 the JobGraph is 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 of ExecutionPlanSchedulingContext.
      Parameters:
      defaultMaxParallelism - the default value for maximum parallelism.
      Returns:
      an instance of ExecutionPlanSchedulingContext.