How to change the parallelism of a running topology, 动态的改变并发度
Storm支持在不restart topology的情况下, 动态的改变(增减)worker processes的数目和executors的数目, 称为rebalancing.
通过Storm web UI, 或者通过storm rebalance命令, 见下面的例子
A nifty feature of Storm is that you can increase or decrease the number of worker processes and/or executors without being required to restart the cluster or the topology. The act of doing so is called rebalancing.
You have two options to rebalance a topology:
Use the Storm web UI to rebalance the topology.(怎么使用?)
Use the CLI tool storm rebalance as described below.
Here is an example of using the CLI tool:
Reconfigure the topology “mytopology” to use 5 worker processes,
the spout “blue-spout” to use 3 executors and
the bolt “yellow-bolt” to use 10 executors.
$ storm rebalance mytopology -n 5 -e blue-spout=3 -e yellow-bolt=10