Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Summary: Use framework thread pool to execute operator hand-offs and synchronous sub-DAG executions.
Description: Currently, the operator implementation chains the future using synchronous APIs (thenCompose, thenApply) which results in execution of these method calls on the future completion thread which happens to be the user thread in case of asynchronous operators in application DAG.
Changes:
- Use thread pool inject through `job.container.task.executor.factory`
- Extend the task executor factory to return operator executorÂ
- Wire in the task executor in `TaskContext`
- Default implementation which uses `#getTaskExecutor` if enabled and `job.container.thread.pool.size` > 1 or fallback to `ForkJoinPool` if disabled.
- Unit tests for the factory
- Test updates
API Changes:
- Add `getOperatorExecutor` to `TaskExecutorFactory`
- Provide a default implementation that reuses `getTaskExecutor`