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

 ##########
 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:
   Right, the motivation is the use of this method in constructor.
   Thanks for pointing out about `getEnvironment` (it was modified made `final` 
too but then reverted accidentally while fixing tests).
   
   I did consider the alternative of using specific values in constructor, but 
then we can get inconsistency between values used in constructor with ones in 
getters. So using getters here and declaring them `final` I think is a lesser 
evil.
   
   Regarding the contract of `AbstractInvokable` and `StreamTask`, I don't 
think these methods are extension points (as opposed to `processInput` for 
example), and therefore shouldn't be overridden.

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