Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2781

Use framework thread to execute hand-offs and sub-DAG execution

    XMLWordPrintableJSON

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`

      Attachments

        Activity

          People

            bharathkk Bharath Kumarasubramanian
            bharathkk Bharath Kumarasubramanian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m