how to set JVM parameter when submit topology?

1,541 views
Skip to first unread message

happy li

unread,
Dec 29, 2011, 6:04:42 AM12/29/11
to storm-user
the code needs to connect mysql to store data, in develop environment
it connects to mysql A, in live environment it connects to mysql B.
Distinguish between the two environments is by setting a JVM parameter
"-Dconfig.product=true".

Does storm support setting JVM parameter when submitting topology? and
how?

songhe yang

unread,
Dec 29, 2011, 9:48:42 AM12/29/11
to storm-user
You can set the configure in storm.yaml.

# to nimbus
nimbus.childopts: "-Xmx1024m"

# to supervisor
supervisor.childopts: "-Xmx1024m"

# to worker
worker.childopts: "-Xmx768m"

happy li

unread,
Dec 29, 2011, 8:52:05 PM12/29/11
to storm-user
so, in my case, I should write:
worker.childopts:"-Dconfig.product=true"

right?

happy li

unread,
Dec 29, 2011, 9:51:42 PM12/29/11
to storm-user
I search topic about JVM in this group, and I get the answer,
something like this:

worker.childopts: "-Dworker=worker -Xmx768m -Xdebug -Xnoagent -
Djava.compiler=NONE -
Xrunjdwp:transport=dt_socket,address=8111,suspend=y,server=y "

Hope this can also help others.
Reply all
Reply to author
Forward
0 new messages