Repository: storm
Updated Branches:
  refs/heads/master 4264bfc2a -> 915ce3848


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/ba238588
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/ba238588
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/ba238588

Branch: refs/heads/master
Commit: ba2385882e705ebf5c33f5a03b67dc3b14781460
Parents: df3867f
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:45:24 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/ba238588/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