pnowojski commented on a change in pull request #8442: [FLINK-12483] Support 
(legacy) SourceFunction as special case in the mailbox model for stream tasks
URL: https://github.com/apache/flink/pull/8442#discussion_r284573667
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -230,14 +242,29 @@ protected StreamTask(
         * This method implements the default action of the task (e.g. 
processing one event from the input). Implementations
         * should (in general) be non-blocking.
         *
-        * @return <code>true</code> if there is more work to perform as 
default action for this task and <code>false</code>
-        * if the task is ready to finish.
+        * @param context context object for collaborative interaction between 
the action and the stream task.
         * @throws Exception on any problems in the action.
         */
-       protected abstract boolean performDefaultAction() throws Exception;
+       protected abstract void performDefaultAction(ActionContext context) 
throws Exception;
 
-       protected void run() throws Exception {
-               while (isRunning && performDefaultAction()) {}
+       /**
+        * Runs the stream-tasks main processing loop.
+        */
+       private void run() throws Exception {
 
 Review comment:
   Could you benchmark the impact of those changes? It would be nice to measure 
`OneInputStreamTask` somehow in an isolation, unless we have good coverage of 
it in window benchmarks (`globalWindow`? `keyBy`?). Probably we need to either 
enable checkpointing for those benchmarks or add a separate benchmark(s) with 
checkpointing.

----------------------------------------------------------------
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