You can configure the jvm opts in ./conf/storm.yaml, restart the
nimbus and supervisor, then the worker will have the correct jvm opts.
Try it.
BTW: I don't why the statement "conf.put(Config.WORKER_CHILDOPTS, "-
Xmx768m -Xms768m -XX:MaxPermSize=256m
-XX:+UseParallelGC"); " is not worked.
On Dec 30, 3:42 pm, Min Zhou <
coderp...@gmail.com> wrote:
> The code doesn't show where the conf is from, which is the key for this
> issue.
>
> 2011/12/30 Haitao Yao <
yao.e...@gmail.com>
>
>
>
>
>
>
>
>
>
>
>
> > I think the worker jvm options is decided by the
> > ${storm_home}/conf/storm.yaml
>
> > here's the code to launch the worker:
>
> > (defmethod launch-worker
> > :distributed [conf shared-context storm-id supervisor-id port
> > worker-id worker-thread-pids-atom]
> > (let [stormroot (supervisor-stormdist-root conf storm-id)
> > stormjar (supervisor-stormjar-path stormroot)
> > classpath (add-to-classpath (current-classpath) [stormjar])
> > childopts (conf *WORKER-CHILDOPTS*)
> > logfilename (str "worker-" port ".log")
> > command (str "java -server " childopts
> > " -Djava.library.path=" (conf *JAVA-LIBRARY-PATH*)
> > " -Dlogfile.name=" logfilename
> > " -Dlog4j.configuration=storm.log.properties"
> > " -cp " classpath " backtype.storm.daemon.worker "
> > storm-id " " supervisor-id " " port " " worker-id)]
> > (launch-process command)
> > ))
>
> > 在 2011-12-30,下午3:03, Min Zhou 写道:
>
> > Hi all,
>
> > I set the worker.childopts in my topology driver class like below
>
> > Config conf = new Config();
> > conf.put(Config.WORKER_CHILDOPTS, "-Xmx768m -Xms768m -XX:MaxPermSize=256m
> > -XX:+UseParallelGC");
>
> > and submitted the topology. The worker log showed that child.opts is
> > correct.
>
> > 2011-12-30 14:49:32 worker [INFO] Worker has topology config {"
storm.id"
> > "topn-141-1325227770", "topology.fall.back.on.java.serialization" true,
> > "zmq.linger.millis" 5000, "topology.skip.missing.kryo.registrations" false,
> > "storm.zookeeper.session.timeout" 20000, "nimbus.reassign" true,
> > "nimbus.monitor.freq.secs" 10, "java.library.path"
> > "/usr/local/lib:/opt/local/lib:/usr/lib:/usr/lib64:/lib64:/usr/local/lib64" ,
> > "storm.local.dir" "/disk1/storm", "supervisor.worker.start.timeout.secs"
> > 240, "nimbus.host" "dw26.kgb.sqa.cm4", "storm.zookeeper.port" 2181,
> > "storm.zookeeper.root" "/storm", "supervisor.enable" true,
> > "storm.zookeeper.servers" ["dw94.kgb.sqa.cm4"], "*worker.childopts*" "*-Xmx768m
> > -Xms768m -XX:MaxPermSize=256m -XX:+UseParallelGC*",
> > "supervisor.heartbeat.frequency.secs" 5, "drpc.port" 3772,
> > "supervisor.monitor.frequency.secs" 3, "task.heartbeat.frequency.secs" 3,
> > "topology.max.spout.pending" 1024, "supervisor.slots.ports" [6700 6701 6702
> > 6703], "topology.debug" false, "nimbus.task.launch.secs" 240,
> > "nimbus.supervisor.timeout.secs" 60, "topology.kryo.register" nil,
> > "topology.message.timeout.secs" 60, "task.refresh.poll.secs" 10,
> > "topology.workers" 19, "supervisor.childopts" "-Xmx1024m",
> > "nimbus.thrift.port" 6627, "topology.stats.sample.rate" 0.05,
> > "worker.heartbeat.frequency.secs" 1, "nimbus.task.timeout.secs" 30,
> > "zmq.threads" 1, "topology.state.synchronization.timeout.secs" 60,
> > "supervisor.worker.timeout.secs" 30, "nimbus.file.copy.expiration.secs"
> > 600, "storm.local.mode.zmq" false, "ui.port" 8080, "nimbus.childopts"
> > "-Xmx1024m", "topology.ackers" 2, "storm.cluster.mode" "distributed",
> > "topology.optimize" true, "topology.max.task.parallelism" nil}
> > 2011-12-30 14:49:32 worker [INFO] Worker
> > 5c211114-8c4e-405d-8604-31a24ded4de8 for storm topn-141-1325227770 on
> > 86f82bde-eee2-4e8d-92a8-ec3746769c67:6700 has finished loading
>
> > but worker process didn't take the child options when starting.
>
> > $ ps aux | grep 21603
> > 50957 21603 149 0.7 1262992 193552 ? Sl 14:49 1:08 java
> > -server -Xmx768m
> > -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib:/usr/lib64:/lib6 4:/usr/local/lib64
> > -Dlogfile.name=worker-6700.log -Dlog4j.configuration=storm.log.properties
> > -cp /home/
> >
zhouchen.zm/storm-0.6.0/storm-0.6.0.jar:/home/zhouchen.zm/storm-0.6.0/lib/s lf4j-log4j12-1.5.8.jar:/home/
zhouchen.zm/storm-0.6.0/lib/clout-0.4.1.jar:/h ome/
zhouchen.zm/storm-0.6.0/lib/commons-io-1.4.jar:/home/zhouchen.zm/storm- 0.6.0/lib/ring-servlet-0.3.11.jar:/home/
zhouchen.zm/storm-0.6.0/lib/jvyaml- 1.0.0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/json-simple-1.1.jar:/home/zhouc hen.zm/storm-0.6.0/lib/compojure-0.6.4.jar:/home/zhouchen.zm/storm-0.6.0/li b/clojure-1.2.0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/httpcore-4.0.1.jar:/h ome/
zhouchen.zm/storm-0.6.0/lib/httpclient-4.0.1.jar:/home/zhouchen.zm/stor m-0.6.0/lib/clojure-contrib-1.2.0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/clj -time-0.3.0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/ring-core-0.3.10.jar:/hom e/
zhouchen.zm/storm-0.6.0/lib/log4j-1.2.16.jar:/home/zhouchen.zm/storm-0.6. 0/lib/commons-codec-1.3.jar:/home/
zhouchen.zm/storm-0.6.0/lib/carbonite-1.0 .0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/asm-3.2.jar:/home/zhouchen.zm/stor m-0.6.0/lib/kryo-1.04.jar:/home/
zhouchen.zm/storm-0.6.0/lib/slf4j-api-1.5.8 .jar:/home/
zhouchen.zm/storm-0.6.0/lib/hiccup-0.3.6.jar:/home/zhouchen.zm/s torm-0.6.0/lib/commons-fileupload-1.2.1.jar:/home/
zhouchen.zm/storm-0.6.0/l ib/ring-jetty-adapter-0.3.11.jar:/home/
zhouchen.zm/storm-0.6.0/lib/commons- lang-2.5.jar:/home/
zhouchen.zm/storm-0.6.0/lib/jline-0.9.94.jar:/home/zhouc hen.zm/storm-0.6.0/lib/servlet-api-2.5.jar:/home/zhouchen.zm/storm-0.6.0/li b/libthrift7-0.7.0.jar:/home/
zhouchen.zm/storm-0.6.0/lib/tools.macro-0.1.0. jar:/home/
zhouchen.zm/storm-0.6.0/lib/minlog-1.2.jar:/home/zhouchen.zm/stor m-0.6.0/lib/joda-time-1.6.jar:/home/
zhouchen.zm/storm-0.6.0/lib/servlet-api -2.5-20081211.jar:/home/
zhouchen.zm/storm-0.6.0/lib/reflectasm-1.01.jar:/ho me/
zhouchen.zm/storm-0.6.0/lib/jetty-util-6.1.26.jar:/home/zhouchen.zm/stor m-0.6.0/lib/commons-exec-1.1.jar:/home/
zhouchen.zm/storm-0.6.0/lib/jetty-6. 1.26.jar:/home/
zhouchen.zm/storm-0.6.0/lib/junit-3.8.1.jar:/home/zhouchen.z m/storm-0.6.0/lib/core.incubator-0.1.0.jar:/home/
zhouchen.zm/storm-0.6.0/li b/zookeeper-3.3.2.jar:/home/
zhouchen.zm/storm-0.6.0/lib/jzmq-2.1.0.jar:/hom e/
zhouchen.zm/storm-0.6.0/lib/commons-logging-1.1.1.jar:/home/zhouchen.zm/s torm-0.6.0/log4j:/home/
zhouchen.zm/storm-0.6.0/conf:/disk1/storm/supervisor /stormdist/topn-141-1325227770/stormjar.jarbacktype.storm.daemon.worker topn-141-1325227770