Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2377#discussion_r75321520
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/jobmaster/JobMaster.java
 ---
    @@ -75,18 +82,132 @@
        /** UUID to filter out old registration runs */
        private UUID currentRegistrationRun;
     
    -   public JobMaster(RpcService rpcService, ExecutorService 
executorService) {
    +   /** Logical representation of the job */
    +   private JobGraph jobGraph;
    +   private JobID jobID;
    +
    +   /** Configuration of the job */
    +   private Configuration configuration;
    +   private RecoveryMode recoveryMode;
    +
    +   /** Service to contend for and retrieve the leadership of JM and RM */
    +   private HighAvailabilityServices highAvailabilityServices;
    +
    +   /** Leader Management */
    +   private LeaderElectionService leaderElectionService = null;
    +   private UUID leaderSessionID;
    +
    +   public JobMaster(
    +           JobGraph jobGraph,
    +           Configuration configuration,
    +           RpcService rpcService,
    +           ExecutorService executorService,
    +           HighAvailabilityServices highAvailabilityService
    +   ) {
                super(rpcService);
    -           executionContext = ExecutionContext$.MODULE$.fromExecutor(
    +
    +           this.jobGraph = Preconditions.checkNotNull(jobGraph);
    +           this.jobID = Preconditions.checkNotNull(jobGraph.getJobID());
    +
    +           this.configuration = configuration;
    +           this.recoveryMode = RecoveryMode.fromConfig(configuration);
    +
    +           this.executionContext = ExecutionContext$.MODULE$.fromExecutor(
                        Preconditions.checkNotNull(executorService));
    -           scheduledExecutorService = new ScheduledThreadPoolExecutor(1);
    +           this.scheduledExecutorService = new 
ScheduledThreadPoolExecutor(1);
    --- End diff --
    
    We might can get rid of these execution contexts, because the `RpcService` 
now offers some as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to