File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
core/src/main/java/com/dtstack/flink/sql/environment Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -113,16 +113,13 @@ public JobExecutionResult execute(String jobName) throws Exception {
113113 LOG .info ("Running job on local embedded Flink mini cluster" );
114114 }
115115
116- MiniCluster exec = null ;
117- try {
118- exec = new MiniCluster (configBuilder .build ());
116+ try (MiniCluster exec = new MiniCluster (configBuilder .build ());) {
119117 exec .start ();
120- return exec .executeJobBlocking (jobGraph );
121- } finally {
118+ JobExecutionResult jobExecutionResult = exec .executeJobBlocking (jobGraph );
122119 transformations .clear ();
123- if ( null != exec ) {
124- exec . closeAsync ();
125- }
120+ return jobExecutionResult ;
121+ } catch ( Exception e ) {
122+ throw new RuntimeException ( e );
126123 }
127124 }
128125}
You can’t perform that action at this time.
0 commit comments