Permalink
Browse files

url encode/decode storm-id when launching workers

  • Loading branch information...
1 parent 439dd82 commit 39ec53e46b2ce2f62309dedb3ceba2f5f76f231b @nathanmarz nathanmarz committed Mar 4, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/clj/backtype/storm/daemon/supervisor.clj
  2. +1 −1 src/clj/backtype/storm/daemon/worker.clj
@@ -378,8 +378,8 @@
" -Dlogfile.name=" logfilename
" -Dstorm.home=" (System/getProperty "storm.home")
" -Dlog4j.configuration=storm.log.properties"
- " -cp " classpath " backtype.storm.daemon.worker \""
- storm-id "\" " supervisor-id " " port " " worker-id)]
+ " -cp " classpath " backtype.storm.daemon.worker "
+ (java.net.URLEncoder/encode storm-id) " " supervisor-id " " port " " worker-id)]
(log-message "Launching worker with command: " command)
(launch-process command :environment {"LD_LIBRARY_PATH" (conf JAVA-LIBRARY-PATH)})
))
@@ -254,4 +254,4 @@
(defn -main [storm-id supervisor-id port-str worker-id]
(let [conf (read-storm-config)]
(validate-distributed-mode! conf)
- (mk-worker conf nil storm-id supervisor-id (Integer/parseInt port-str) worker-id)))
+ (mk-worker conf nil (java.net.URLDecoder/decode storm-id) supervisor-id (Integer/parseInt port-str) worker-id)))

0 comments on commit 39ec53e

Please sign in to comment.