Search code examples
apache-stormtrident

In storm, can I specify the number of workers a bolt will run on?


And when using the Trident, if a batch is going to be processed on one bolt, can the batch run on different workers?


Solution

  • You can (but it is tricky). And no.

    For 1) There is no configuration parameter for this. You can only configure the number of workers of a whole topology. However, you can implement a custom scheduler to assign the executors of a bolt to a specific number of workers.

    For 2) A batch is a "unit of work" an cannot be divided. Thus, it can not be partitioned to multiple workers.