zhuzhurk 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_r325292832
########## 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: Agreed that we can infer from the cluster config log for the scheduler used. But it is not very straight forward, especially when it is not configured and the default config is used. As we are already logging the failover strategy for each job, I think logging the scheduler for each job is acceptable. To avoid logging it for multiple times, we can just log it the JobMaster constructor. ---------------------------------------------------------------- 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