pnowojski commented on a change in pull request #8409: [FLINK-12478] Decompose 
monolithic run-loops in StreamTask implementa…
URL: https://github.com/apache/flink/pull/8409#discussion_r284584029
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -222,12 +222,24 @@ protected StreamTask(
 
        protected abstract void init() throws Exception;
 
-       protected abstract void run() throws Exception;
-
        protected abstract void cleanup() throws Exception;
 
        protected abstract void cancelTask() throws Exception;
 
+       /**
+        * 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.
+        * @throws Exception on any problems in the action.
+        */
+       protected abstract boolean performDefaultAction() throws Exception;
 
 Review comment:
   Your changes are modifying the same lines of code twice, which just add 
reviewing noise (it took me some time to realise that you are overwriting those 
changes here later and I have already written a comment that something is 
missing with ` boolean performDefaultAction`)  and the same will be true in the 
future, if someone will want to look at the git history. 
   
   Thus either we should come up with a sequence of changes that do not modify 
the same code twice too much (for example leaving `ActionContext` not 
implemented/empty/no-op in the first commit?) or the commits should be squashed.

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