rmatharu commented on a change in pull request #1011: SAMZA-2172: Make High 
Level applications respect job.container.thread.pool.size
URL: https://github.com/apache/samza/pull/1011#discussion_r279102305
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/task/AsyncStreamTaskAdapter.java
 ##########
 @@ -19,24 +19,20 @@
 
 package org.apache.samza.task;
 
-import java.util.concurrent.ExecutorService;
 import org.apache.samza.context.Context;
 import org.apache.samza.system.IncomingMessageEnvelope;
 
 
 /**
- * AsyncStreamTaskAdapter allows a StreamTask to be executed in parallel.The 
class
- * uses the build-in thread pool to invoke StreamTask.process and triggers
- * the callbacks once it's done. If the thread pool is null, it follows the 
legacy
- * synchronous model to execute the tasks on the run loop thread.
+ * AsyncStreamTaskAdapter adapts a StreamTask to be a AsyncStreamTask.
+ * If job.container.thread.pool.size > 1 the framework executes the adapted 
task in parallel.
+ * Otherwise, it follows the legacy synchronous model to execute the tasks on 
the run loop thread.
 
 Review comment:
   Would it be possible to consolidate, so even for thread-pool size = 1, we 
can execute with a threadPool of size 1, and get rid of the legacy path. Or 
would the context switching overhead (for thread-pool size 1) be significant 
enough to warrant this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to