You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2016/06/07 05:13:14 UTC

[3/4] storm git commit: STORM-1864 Removed NimbusClient in try-resource-as clause as it is not autocloseable

STORM-1864 Removed NimbusClient in try-resource-as clause as it is not autocloseable


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/fc404b59
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/fc404b59
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/fc404b59

Branch: refs/heads/1.x-branch
Commit: fc404b595da2bf7199d29b9d06b9452ff17ad0be
Parents: 051b908
Author: Satish Duggana <sd...@hortonworks.com>
Authored: Tue Jun 7 10:12:10 2016 +0530
Committer: Satish Duggana <sd...@hortonworks.com>
Committed: Tue Jun 7 10:12:10 2016 +0530

----------------------------------------------------------------------
 storm-core/src/jvm/org/apache/storm/StormSubmitter.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/fc404b59/storm-core/src/jvm/org/apache/storm/StormSubmitter.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/StormSubmitter.java b/storm-core/src/jvm/org/apache/storm/StormSubmitter.java
index 9766740..eb7d33d 100644
--- a/storm-core/src/jvm/org/apache/storm/StormSubmitter.java
+++ b/storm-core/src/jvm/org/apache/storm/StormSubmitter.java
@@ -234,8 +234,9 @@ public class StormSubmitter {
                     throw new RuntimeException("Topology with name `" + name + "` already exists on cluster");
                 }
                 String jar = submitJarAs(conf, System.getProperty("storm.jar"), progressListener, asUser);
-                try (NimbusClient client = NimbusClient.getConfiguredClientAs(conf, asUser)) {
+                try {
                     LOG.info("Submitting topology " + name + " in distributed mode with conf " + serConf);
+                    NimbusClient client = NimbusClient.getConfiguredClientAs(conf, asUser);
                     if (opts != null) {
                         client.getClient().submitTopologyWithOpts(name, jar, serConf, topology, opts);
                     } else {