[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353649449
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##
 @@ -49,6 +50,8 @@
  */
 public class DefaultSchedulerFactory implements SchedulerNGFactory {
 
+   private static final Logger LOG = 
LoggerFactory.getLogger(DefaultSchedulerFactory.class);
+
@Override
public SchedulerNG createInstance(
final Logger log,
 
 Review comment:
   Ok.


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353641254
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##
 @@ -49,6 +50,8 @@
  */
 public class DefaultSchedulerFactory implements SchedulerNGFactory {
 
+   private static final Logger LOG = 
LoggerFactory.getLogger(DefaultSchedulerFactory.class);
+
@Override
public SchedulerNG createInstance(
final Logger log,
 
 Review comment:
   Actually I'm also thinking which is better: 
   1. use `JobManager` logger for `DefaultScheduler` as we currently do, or 
   2. create an individual logger for `DefaultScheduler`
   
   WDYT?


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353641254
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##
 @@ -49,6 +50,8 @@
  */
 public class DefaultSchedulerFactory implements SchedulerNGFactory {
 
+   private static final Logger LOG = 
LoggerFactory.getLogger(DefaultSchedulerFactory.class);
+
@Override
public SchedulerNG createInstance(
final Logger log,
 
 Review comment:
   Actually I'm also thinking which is better: 
   1. use `JobManager` logger for `DefaultScheduler` as we currently do, or 
   2. create an individual logger for `DefaultScheduler`
   WDYT?


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353638280
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##
 @@ -49,6 +50,8 @@
  */
 public class DefaultSchedulerFactory implements SchedulerNGFactory {
 
+   private static final Logger LOG = 
LoggerFactory.getLogger(DefaultSchedulerFactory.class);
+
@Override
public SchedulerNG createInstance(
final Logger log,
 
 Review comment:
   Should we use this logger?


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353634356
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartBackoffTimeStrategyFactoryLoader.java
 ##
 @@ -56,20 +56,20 @@ private RestartBackoffTimeStrategyFactoryLoader() {
 *
 * @param jobRestartStrategyConfiguration restart configuration given 
within the job graph
 * @param clusterConfiguration cluster(server-side) configuration
-* @param isCheckpointingEnabled if checkpointing is enabled for the job
+* @param checkpointingEnabled if checkpointing is enabled for the job
 * @return new version restart strategy factory
 */
public static RestartBackoffTimeStrategy.Factory 
createRestartBackoffTimeStrategyFactory(
final RestartStrategies.RestartStrategyConfiguration 
jobRestartStrategyConfiguration,
final Configuration clusterConfiguration,
-   final boolean isCheckpointingEnabled) {
+   final boolean checkpointingEnabled) {
 
 Review comment:
   Ok.


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353618022
 
 

 ##
 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:
   > Another observation: The factory interface for the restart back off time 
strategies isn't really needed at the moment because after 
`createRestartBackoffTimeStrategyFactory` we immediately call `create()`.
   
   That's true. The `RestartBackoffTimeStrategy` creation does not need runtime 
information at the moment. Thought we can keep it as is before it really causes 
some troubles.


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-04 Thread GitBox
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_r353600708
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartBackoffTimeStrategyFactoryLoader.java
 ##
 @@ -56,20 +56,20 @@ private RestartBackoffTimeStrategyFactoryLoader() {
 *
 * @param jobRestartStrategyConfiguration restart configuration given 
within the job graph
 * @param clusterConfiguration cluster(server-side) configuration
-* @param isCheckpointingEnabled if checkpointing is enabled for the job
+* @param checkpointingEnabled if checkpointing is enabled for the job
 * @return new version restart strategy factory
 */
public static RestartBackoffTimeStrategy.Factory 
createRestartBackoffTimeStrategyFactory(
final RestartStrategies.RestartStrategyConfiguration 
jobRestartStrategyConfiguration,
final Configuration clusterConfiguration,
-   final boolean isCheckpointingEnabled) {
+   final boolean checkpointingEnabled) {
 
 Review comment:
   Ok. Seems to me it is mostly referring to class fields' name regarding the 
getter/setter name.
   As a variable, I think both the previous and current one are fine since they 
make sense and do not look weird.


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-03 Thread GitBox
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_r353527694
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultSchedulerFactory.java
 ##
 @@ -69,14 +72,15 @@ public SchedulerNG createInstance(
 
final SchedulingStrategyFactory schedulingStrategyFactory = 
createSchedulingStrategyFactory(jobGraph.getScheduleMode());
 
 Review comment:
   Here's a question unrelated to this issue.
   Could we make the logging level for schedulingStrategy in 
`DefaultScheduler#startSchedulingInternal` to be `info`?
   I did not find a way to identify the scheduling strategy from info level 
logs, without it we may need to ask users for this info.


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-03 Thread GitBox
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_r353521772
 
 

 ##
 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:
   `Using back off time strategy` -> `Using start back off time strategy`


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


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-03 Thread GitBox
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_r353522832
 
 

 ##
 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:
   Could we add this log in `DefaultScheduler`, along with the logging for 
failover strategy? So that we do not need to introduce a new logger 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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] zhuzhurk commented on a change in pull request #10406: [FLINK-15045][runtime] Only log RestartStrategy in legacy scheduling mode

2019-12-03 Thread GitBox
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_r353525659
 
 

 ##
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartBackoffTimeStrategyFactoryLoader.java
 ##
 @@ -56,20 +56,20 @@ private RestartBackoffTimeStrategyFactoryLoader() {
 *
 * @param jobRestartStrategyConfiguration restart configuration given 
within the job graph
 * @param clusterConfiguration cluster(server-side) configuration
-* @param isCheckpointingEnabled if checkpointing is enabled for the job
+* @param checkpointingEnabled if checkpointing is enabled for the job
 * @return new version restart strategy factory
 */
public static RestartBackoffTimeStrategy.Factory 
createRestartBackoffTimeStrategyFactory(
final RestartStrategies.RestartStrategyConfiguration 
jobRestartStrategyConfiguration,
final Configuration clusterConfiguration,
-   final boolean isCheckpointingEnabled) {
+   final boolean checkpointingEnabled) {
 
 Review comment:
   Is there any code style requirement for boolean variable names? Not sure if 
I missed it in the code style guide.


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