Skip to content

Commit 317710d

Browse files
author
Nathan Marz
committed
implemented topology.worker.childopts
1 parent f7fa84a commit 317710d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/clj/backtype/storm/daemon/supervisor.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,11 @@
367367
:distributed [conf shared-context storm-id supervisor-id port worker-id worker-thread-pids-atom]
368368
(let [stormroot (supervisor-stormdist-root conf storm-id)
369369
stormjar (supervisor-stormjar-path stormroot)
370+
storm-conf (read-supervisor-storm-conf conf storm-id)
370371
classpath (add-to-classpath (current-classpath) [stormjar])
371-
childopts (.replaceAll (conf WORKER-CHILDOPTS) "%ID%" (str port))
372+
childopts (.replaceAll (str (conf WORKER-CHILDOPTS) " " (storm-conf TOPOLOGY-WORKER-CHILDOPTS))
373+
"%ID%"
374+
(str port))
372375
logfilename (str "worker-" port ".log")
373376
command (str "java -server " childopts
374377
" -Djava.library.path=" (conf JAVA-LIBRARY-PATH)

src/jvm/backtype/storm/Config.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ public class Config extends HashMap<String, Object> {
332332
* Whether or not to use Java serialization in a topology.
333333
*/
334334
public static String TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION="topology.fall.back.on.java.serialization";
335+
336+
/**
337+
* Topology-specific options for the worker child process. This is used in addition to WORKER_CHILDOPTS.
338+
*/
339+
public static String TOPOLOGY_WORKER_CHILDOPTS="topology.worker.childopts";
335340

336341
/**
337342
* The number of threads that should be used by the zeromq context in each worker process.

0 commit comments

Comments
 (0)