Class AdaptiveExecutionHandlerFactory


  • public class AdaptiveExecutionHandlerFactory
    extends Object
    A factory class for creating instances of AdaptiveExecutionHandler. This factory provides a method to create an appropriate handler based on the type of the execution plan.
    • Constructor Detail

      • AdaptiveExecutionHandlerFactory

        public AdaptiveExecutionHandlerFactory()
    • Method Detail

      • create

        public static AdaptiveExecutionHandler create​(ExecutionPlan executionPlan,
                                                      boolean enableBatchJobRecovery,
                                                      ClassLoader userClassLoader,
                                                      Executor serializationExecutor)
                                               throws org.apache.flink.util.DynamicCodeLoadingException
        Creates an instance of AdaptiveExecutionHandler based on the provided execution plan.

        TODO: Currently, adaptive execution cannot work with batch job progress recovery, so we always use NonAdaptiveExecutionHandler if batch job recovery is enabled. This limitation will be removed in the future when we adapt adaptive batch execution to batch job recovery.

        Parameters:
        executionPlan - The execution plan, which can be either a JobGraph or a StreamGraph.
        enableBatchJobRecovery - Whether to enable batch job recovery.
        userClassLoader - The class loader for the user code.
        serializationExecutor - The executor used for serialization tasks.
        Returns:
        An instance of AdaptiveExecutionHandler.
        Throws:
        IllegalArgumentException - if the execution plan is neither a JobGraph nor a StreamGraph.
        org.apache.flink.util.DynamicCodeLoadingException