You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/11 14:56:45 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #9663: [WIP][FLINK-12433][runtime] Implement DefaultScheduler stub

tillrohrmann commented on a change in pull request #9663: [WIP][FLINK-12433][runtime] Implement DefaultScheduler stub
URL: https://github.com/apache/flink/pull/9663#discussion_r323256952
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java
 ##########
 @@ -75,10 +137,281 @@ public DefaultScheduler(
 			slotRequestTimeout,
 			shuffleMaster,
 			partitionTracker);
+
+		this.restartBackoffTimeStrategy = restartBackoffTimeStrategy;
+		this.slotRequestTimeout = slotRequestTimeout;
+		this.slotProvider = slotProvider;
+		this.delayExecutor = delayExecutor;
+		this.userCodeLoader = userCodeLoader;
+		this.schedulingStrategyFactory = checkNotNull(schedulingStrategyFactory);
+		this.failoverStrategyFactory = checkNotNull(failoverStrategyFactory);
+		this.executionVertexOperations = checkNotNull(executionVertexOperations);
+		this.executionVertexVersioner = executionVertexVersioner;
+		this.conditionalFutureHandlerFactory = new ConditionalFutureHandlerFactory(executionVertexVersioner);
+	}
+
+	// ------------------------------------------------------------------------
+	// SchedulerNG
+	// ------------------------------------------------------------------------
+
+	@Override
+	public void startSchedulingInternal() {
+		initializeScheduling();
+		schedulingStrategy.startScheduling();
+	}
+
+	private void initializeScheduling() {
+		executionFailureHandler = new ExecutionFailureHandler(failoverStrategyFactory.create(getFailoverTopology()), restartBackoffTimeStrategy);
+		schedulingStrategy = schedulingStrategyFactory.createInstance(this, getSchedulingTopology(), getJobGraph());
+		executionSlotAllocator = new DefaultExecutionSlotAllocator(slotProvider, getInputsLocationsRetriever(), slotRequestTimeout);
+		setTaskFailureListener(new UpdateTaskExecutionStateInDefaultSchedulerListener(this, getJobGraph().getJobID()));
 
 Review comment:
   Why are we setting these fields only after `startSchedulingInternal` is called? Would it be possible to initialize them in the 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:
users@infra.apache.org


With regards,
Apache Git Services