GJL commented on a change in pull request #9675: [FLINK-13953] [runtime] 
Facilitate enabling new scheduler in MiniCluster Tests
URL: https://github.com/apache/flink/pull/9675#discussion_r325133275
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobMaster.java
 ##########
 @@ -810,15 +812,24 @@ private void startHeartbeatServices() {
                        log);
        }
 
-       private void assignScheduler(
+       private void reassignScheduler(
                        SchedulerNG newScheduler,
                        JobManagerJobMetricGroup newJobManagerJobMetricGroup) {
                validateRunsInMainThread();
                checkState(schedulerNG.requestJobStatus().isTerminalState());
                checkState(jobManagerJobMetricGroup == null);
 
-               schedulerNG = newScheduler;
-               jobManagerJobMetricGroup = newJobManagerJobMetricGroup;
+               assignScheduler(newScheduler, newJobManagerJobMetricGroup);
+       }
+
+       private void assignScheduler(
+                       SchedulerNG scheduler,
+                       JobManagerJobMetricGroup jobManagerJobMetricGroup) {
+
+               this.schedulerNG = scheduler;
+               this.jobManagerJobMetricGroup = jobManagerJobMetricGroup;
+
+               log.info("Scheduler {} is used for job {}.", schedulerNG, 
jobGraph.getJobID());
 
 Review comment:
   I wouldn't log this information here yet:
   -  Scheduler configuration is per cluster at the moment. However, here it is 
logged per job.
   - Potentially logged multiples times per job (if JobMaster loses and regains 
leadership)
   - One can differentiate between the schedulers by looking at the cluster 
configuration, which is already being logged
   
   Bottom line is that I would drop this commit.

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