Class AdaptiveExecutionHandlerFactory
java.lang.Object
org.apache.flink.runtime.scheduler.adaptivebatch.AdaptiveExecutionHandlerFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AdaptiveExecutionHandlercreate(ExecutionPlan executionPlan, boolean enableBatchJobRecovery, ClassLoader userClassLoader, Executor serializationExecutor) Creates an instance ofAdaptiveExecutionHandlerbased on the provided execution plan.
-
Constructor Details
-
AdaptiveExecutionHandlerFactory
public AdaptiveExecutionHandlerFactory()
-
-
Method Details
-
create
public static AdaptiveExecutionHandler create(ExecutionPlan executionPlan, boolean enableBatchJobRecovery, ClassLoader userClassLoader, Executor serializationExecutor) throws org.apache.flink.util.DynamicCodeLoadingException Creates an instance ofAdaptiveExecutionHandlerbased on the provided execution plan.TODO: Currently, adaptive execution cannot work with batch job progress recovery, so we always use
NonAdaptiveExecutionHandlerif 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 aJobGraphor aStreamGraph.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 aJobGraphnor aStreamGraph.org.apache.flink.util.DynamicCodeLoadingException
-