STORM-853 Fix upload API to handle multi-args properly * flatten arguments so that it can be treated to each arguments
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/edd9baba Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/edd9baba Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/edd9baba Branch: refs/heads/0.10.x-branch Commit: edd9baba1e9f976c8c3d1a2b591ebf33e418a351 Parents: 9579c0b Author: Jungtaek Lim <[email protected]> Authored: Sat Jun 6 13:25:11 2015 +0900 Committer: Jungtaek Lim <[email protected]> Committed: Sat Jun 6 13:25:11 2015 +0900 ---------------------------------------------------------------------- storm-core/src/clj/backtype/storm/ui/core.clj | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/edd9baba/storm-core/src/clj/backtype/storm/ui/core.clj ---------------------------------------------------------------------- diff --git a/storm-core/src/clj/backtype/storm/ui/core.clj b/storm-core/src/clj/backtype/storm/ui/core.clj index c440043..7fcdb47 100644 --- a/storm-core/src/clj/backtype/storm/ui/core.clj +++ b/storm-core/src/clj/backtype/storm/ui/core.clj @@ -515,8 +515,7 @@ (defn run-tplg-submit-cmd [tplg-jar-file tplg-config user] (let [tplg-main-class (if (not-nil? tplg-config) (trim (tplg-config "topologyMainClass"))) - tplg-main-class-args (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyMainClassArgs"))) - tplg-jvm-opts (if (not-nil? tplg-config) (clojure.string/join " " (tplg-config "topologyJvmOpts"))) + tplg-main-class-args (if (not-nil? tplg-config) (tplg-config "topologyMainClassArgs")) storm-home (System/getProperty "storm.home") storm-conf-dir (str storm-home file-path-separator "conf") storm-log-dir (if (not-nil? (*STORM-CONF* "storm.log.dir")) (*STORM-CONF* "storm.log.dir") @@ -524,10 +523,10 @@ storm-libs (str storm-home file-path-separator "lib" file-path-separator "*") java-cmd (str (System/getProperty "java.home") file-path-separator "bin" file-path-separator "java") storm-cmd (str storm-home file-path-separator "bin" file-path-separator "storm") - tplg-cmd-response (sh storm-cmd "jar" tplg-jar-file - tplg-main-class - tplg-main-class-args - (if (not= user "unknown") (str "-c storm.doAsUser=" user) ""))] + tplg-cmd-response (apply sh + (flatten + [storm-cmd "jar" tplg-jar-file tplg-main-class tplg-main-class-args + (if (not= user "unknown") (str "-c storm.doAsUser=" user) "")]))] (log-message "tplg-cmd-response " tplg-cmd-response) (cond (= (tplg-cmd-response :exit) 0) {"status" "success"}
