mynameborat opened a new pull request, #1667:
URL: https://github.com/apache/samza/pull/1667

   **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.
   
   **Testing**:
   - Unit tests for the factory
   - Test updates for existing `OperatorImpl` tests.
   
   **API Changes**:
   - Add `getOperatorExecutor` to `TaskExecutorFactory`
   - Provide a default implementation that reuses `getTaskExecutor`
   
   **Usage Instructions**:
   Refer to the config documentation to enable operator thread pool and about 
the task executor factory
   
   **Upgrade Instructions**: 
   The operator hand off will use `ForkJoinPool` if no changes are made to 
application. Users may have to tune JVM `ForkJoinPool` to match their user 
thread pool size if they notice performance degradation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to