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:
[email protected]
With regards,
Apache Git Services