[
https://issues.apache.org/jira/browse/FLINK-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14697224#comment-14697224
]
ASF GitHub Bot commented on FLINK-2512:
---------------------------------------
Github user hsaputra commented on a diff in the pull request:
https://github.com/apache/flink/pull/1009#discussion_r37087438
--- Diff:
flink-contrib/flink-storm-compatibility/flink-storm-compatibility-core/src/main/java/org/apache/flink/stormcompatibility/api/FlinkSubmitter.java
---
@@ -99,23 +99,24 @@ public static void submitTopology(final String name,
final Map stormConf, final
final String serConf = JSONValue.toJSONString(stormConf);
- final FlinkClient client =
FlinkClient.getConfiguredClient(stormConf);
- if (client.getTopologyJobId(name) != null) {
- throw new RuntimeException("Topology with name `" +
name + "` already exists on cluster");
- }
- String localJar = System.getProperty("storm.jar");
- if (localJar == null) {
- try {
- for (final File file : ((ContextEnvironment)
ExecutionEnvironment.getExecutionEnvironment())
- .getJars()) {
- // TODO verify that there is onnly one
jar
- localJar = file.getAbsolutePath();
+ try {
+ final FlinkClient client =
FlinkClient.getConfiguredClient(stormConf);
--- End diff --
Shouldn't declaration of ``client`` be outside of the try clause?
> Add client.close() before throw RuntimeException
> ------------------------------------------------
>
> Key: FLINK-2512
> URL: https://issues.apache.org/jira/browse/FLINK-2512
> Project: Flink
> Issue Type: Bug
> Components: flink-contrib
> Affects Versions: 0.8.1
> Reporter: fangfengbin
> Assignee: fangfengbin
> Priority: Minor
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)