Repository: storm
Updated Branches:
  refs/heads/1.x-branch 3ab224a14 -> a6140de0d


STORM-1655 Flux doesn't set return code to non-zero when there's any exception 
while deploying topology to remote cluster

* Modify Flux.runCli() to not catching exceptions so that exception can be 
propagated to main()


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

Branch: refs/heads/1.x-branch
Commit: 723b08735192895b4a8972c0a8b1a49bb7aae33f
Parents: 6163f58
Author: Jungtaek Lim <kabh...@gmail.com>
Authored: Thu Mar 24 16:45:24 2016 +0900
Committer: Jungtaek Lim <kabh...@gmail.com>
Committed: Thu Mar 24 16:47:13 2016 +0900

----------------------------------------------------------------------
 .../main/java/org/apache/storm/flux/Flux.java   | 22 ++++++++------------
 1 file changed, 9 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/723b0873/external/flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java
----------------------------------------------------------------------
diff --git 
a/external/flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java 
b/external/flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java
index cdebd01..5848d2f 100644
--- a/external/flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java
+++ b/external/flux/flux-core/src/main/java/org/apache/storm/flux/Flux.java
@@ -159,20 +159,16 @@ public class Flux {
         if(!cmd.hasOption(OPTION_DRY_RUN)) {
             if (cmd.hasOption(OPTION_REMOTE)) {
                 LOG.info("Running remotely...");
-                try {
-                    // should the topology be active or inactive
-                    SubmitOptions submitOptions = null;
-                    if(cmd.hasOption(OPTION_INACTIVE)){
-                        LOG.info("Deploying topology in an INACTIVE state...");
-                        submitOptions = new 
SubmitOptions(TopologyInitialStatus.INACTIVE);
-                    } else {
-                        LOG.info("Deploying topology in an ACTIVE state...");
-                        submitOptions = new 
SubmitOptions(TopologyInitialStatus.ACTIVE);
-                    }
-                    StormSubmitter.submitTopology(topologyName, conf, 
topology, submitOptions, null);
-                } catch (Exception e) {
-                    LOG.warn("Unable to deploy topology to remote cluster.", 
e);
+                // should the topology be active or inactive
+                SubmitOptions submitOptions = null;
+                if(cmd.hasOption(OPTION_INACTIVE)){
+                    LOG.info("Deploying topology in an INACTIVE state...");
+                    submitOptions = new 
SubmitOptions(TopologyInitialStatus.INACTIVE);
+                } else {
+                    LOG.info("Deploying topology in an ACTIVE state...");
+                    submitOptions = new 
SubmitOptions(TopologyInitialStatus.ACTIVE);
                 }
+                StormSubmitter.submitTopology(topologyName, conf, topology, 
submitOptions, null);
             } else {
                 LOG.info("Running in local mode...");
 

Reply via email to