flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] TisonKun commented on a change in pull request #10194: [FLINK-14758] Add Executor-related interfaces and executor discovery.
Date Mon, 18 Nov 2019 08:03:29 GMT
TisonKun commented on a change in pull request #10194: [FLINK-14758] Add Executor-related interfaces
and executor discovery.
URL: https://github.com/apache/flink/pull/10194#discussion_r347239854
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 ##########
 @@ -1515,7 +1541,31 @@ public JobExecutionResult execute(String jobName) throws Exception
{
 	 * @throws Exception which occurs during job execution.
 	 */
 	@Internal
-	public abstract JobExecutionResult execute(StreamGraph streamGraph) throws Exception;
+	public JobExecutionResult execute(StreamGraph streamGraph) throws Exception {
+		if (configuration.get(DeploymentOptions.TARGET) == null) {
+			throw new RuntimeException("No execution.target specified in your configuration file.");
+		}
+
+		consolidateParallelismDefinitionsInConfiguration();
+
+		final ExecutorFactory executorFactory =
+				executorServiceLoader.getExecutorFactory(configuration);
+
+		final Executor executor = executorFactory.getExecutor(configuration);
 
 Review comment:
   We potentially meet NPE here as my comment above executorFactory is nullable.

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

Mime
View raw message