flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsaputra <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2512]Add client.close() before throw Ru...
Date Fri, 14 Aug 2015 15:27:27 GMT
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message