You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "Nick R. Katsipoulakis" <ni...@gmail.com> on 2015/09/01 22:57:09 UTC

Set the number of workers when submitting jar

Hello all,

Is there a way to set the number of workers when submitting a topology. For
instance, when I type in:

$>storm jar path-to.jar com.MyTopology <here define number of works>

If yes, how can I do the above?

Thanks,
Nikos

Re: Set the number of workers when submitting jar

Posted by TSD-贾宏超 <ji...@neusoft.com>.
public static void main(String[] args) throws Exception {

int workerNumber = Integer.valueOf(args[0]);
                ......// omitted here
Config conf = new Config();
conf.setNumWorkers(workerNumber);
StormSubmitter.submitTopology("bar", conf,
builder.createTopology());
}

 
From: Nick R. Katsipoulakis
Date: 2015-09-02 04:57
To: user@storm.apache.org
Subject: Set the number of workers when submitting jar
Hello all, 

Is there a way to set the number of workers when submitting a topology. For instance, when I type in:

$>storm jar path-to.jar com.MyTopology <here define number of works>

If yes, how can I do the above?

Thanks,
Nikos



---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------