zhijiangW commented on a change in pull request #11515: [FLINK-16744][task] 
implement channel state persistence for unaligned checkpoints
URL: https://github.com/apache/flink/pull/11515#discussion_r401349817
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -651,7 +651,7 @@ boolean isSerializingTimestamps() {
         * Gets the name of the task, in the form "taskname (2/5)".
         * @return The name of the task.
         */
-       public String getName() {
+       public final String getName() {
 
 Review comment:
   I guess the motivation for defining `final` for related parent methods is 
from constructing `SubtaskCheckpointCoordinatorImpl` in `StreamTask` 
constructor. If so, we need also define final for 
`AbstractInvokable#getEnvironment` because it is also accessed while 
constructing `SubtaskCheckpointCoordinatorImpl`.
   
   Actually we can avoid using getter while constructing 
`SubtaskCheckpointCoordinatorImpl` to use specific arguments instead. Anyway i 
think it is meaningful to define `final` for some methods if we confirm they 
should not be override by subclasses. But the requirement should not be from 
constructing `SubtaskCheckpointCoordinatorImpl`, and we should review all the 
methods in `AbstractInvokable` and `StreamTask` to make this thing completely. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to