We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 91e8880 + 388e7f8 commit f78e936Copy full SHA for f78e936
core/src/main/java/com/dtstack/flink/sql/environment/MyLocalStreamEnvironment.java
@@ -113,16 +113,13 @@ public JobExecutionResult execute(String jobName) throws Exception {
113
LOG.info("Running job on local embedded Flink mini cluster");
114
}
115
116
- MiniCluster exec = null;
117
- try {
118
- exec = new MiniCluster(configBuilder.build());
+ try (MiniCluster exec = new MiniCluster(configBuilder.build());) {
119
exec.start();
120
- return exec.executeJobBlocking(jobGraph);
121
- } finally {
+ JobExecutionResult jobExecutionResult = exec.executeJobBlocking(jobGraph);
122
transformations.clear();
123
- if (null != exec) {
124
- exec.closeAsync();
125
- }
+ return jobExecutionResult;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
126
127
128
0 commit comments