You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "zhonghongfei@yy.com" <zh...@yy.com> on 2014/10/15 12:22:29 UTC

how can I set the worker jvm dynamically?

the jvm for my spout is too small, but when I set the jvm like this, it doesn't work. so what's the correct way to do so ?
in my spout :
@Override
public Map<String, Object> getComponentConfiguration() {
Config conf = new Config();
//int tickFrequencyInSeconds = 10;
conf.put(Config.WORKER_CHILDOPTS, "-Xmx1024m");
return conf;
}

Re: RE: how can I set the worker jvm dynamically?

Posted by Richards Peter <hb...@gmail.com>.
Please check the following property in Config class:

https://storm.incubator.apache.org/apidocs/backtype/storm/Config.html#TOPOLOGY_WORKER_CHILDOPTS

Try to configure the above property during the time of topology submission
(i.e. in the Config object  passed to StormSubmitter). I think this
property will be applicable for all workers spawned for a topology.

Regards,
Richards Peter.

Re: RE: how can I set the worker jvm dynamically?

Posted by "zhonghongfei@yy.com" <zh...@yy.com>.
Yes, but I want to set it dynamically, that's to say every topology has it's own jvm settings.

From: Simon Cooper
Date: 2014-10-15 19:04
To: user@storm.apache.org
Subject: RE: how can I set the worker jvm dynamically?
You need to put any command line options for the worker in the conf/storm.yaml file on all machines running the supervisors:
worker.childopts: “-Xmx1024m”
then restart the supervisors
From: zhonghongfei@yy.com [mailto:zhonghongfei@yy.com] 
Sent: 15 October 2014 11:22
To: user
Subject: how can I set the worker jvm dynamically?
 
the jvm for my spout is too small, but when I set the jvm like this, it doesn't work. so what's the correct way to do so ?
in my spout :
@Override
public Map<String, Object> getComponentConfiguration() {
Config conf = new Config();
//int tickFrequencyInSeconds = 10;
conf.put(Config.WORKER_CHILDOPTS, "-Xmx1024m");
return conf;
}

RE: how can I set the worker jvm dynamically?

Posted by Simon Cooper <si...@featurespace.co.uk>.
You need to put any command line options for the worker in the conf/storm.yaml file on all machines running the supervisors:
worker.childopts: "-Xmx1024m"
then restart the supervisors
From: zhonghongfei@yy.com [mailto:zhonghongfei@yy.com]
Sent: 15 October 2014 11:22
To: user
Subject: how can I set the worker jvm dynamically?

the jvm for my spout is too small, but when I set the jvm like this, it doesn't work. so what's the correct way to do so ?
in my spout :
@Override
public Map<String, Object> getComponentConfiguration() {
Config conf = new Config();
//int tickFrequencyInSeconds = 10;
conf.put(Config.WORKER_CHILDOPTS, "-Xmx1024m");
return conf;
}