zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] 
Only log RestartStrategy in legacy scheduling mode
URL: https://github.com/apache/flink/pull/10406#discussion_r353616472
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##########
 @@ -77,6 +80,7 @@ public SchedulerNG createInstance(
                                jobMasterConfiguration,
                                jobGraph.isCheckpointingEnabled())
                        .create();
+               LOG.info("Using back off time strategy {} for {} ({}).", 
restartBackoffTimeStrategy, jobGraph.getName(), jobGraph.getJobID());
 
 Review comment:
   > I introduced a log message here because it is closest to the object 
creation. Moreover, I prefer to [only have field 
assignments](https://www.yegor256.com/2015/05/07/ctors-must-be-code-free.html) 
in the constructor (note however, that this already does not hold in 
`DefaultScheduler`). Imo, another reasonable place to log the _scheduling 
configuration_ is in `startSchedulingInternal()`.
   
   fine. In my understanding logging is usually not considered to be real 
logics (though it does something), otherwise in some cases we might find it 
hard to print instance internal states for trouble shooting. 
   Anyway, I think it's also fine to keep the logging here.

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