1u0 commented on a change in pull request #9634: [hotfix][runtime] Streaming 
runtime 1.9 improvements for dubuggability
URL: https://github.com/apache/flink/pull/9634#discussion_r321649978
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
 ##########
 @@ -114,6 +114,7 @@ protected void cleanup() {
        protected void performDefaultAction(ActionContext context) throws 
Exception {
                // Against the usual contract of this method, this 
implementation is not step-wise but blocking instead for
                // compatibility reasons with the current source interface 
(source functions run as a loop, not in steps).
+               sourceThread.setTaskDescription(getName());
 
 Review comment:
   Thanks for review @zhijiangW.
   
   Afair, the story behind why it's done this way in the `master` branch, 
because the `LegacySourceFunctionThread` is instantiated in the constructor of 
`SourceStreamTask` and `StreamTask::getName()` method is not final.
   To avoid a virtual method call in the constructor, @GJL has moved thread's 
name setup to the `performDefaultAction()` method just before starting the 
thread.
   
   

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