Github user danny0405 commented on the issue:
https://github.com/apache/storm/pull/1874
@erikdw thx for your nice review, i have fixed the headline and ticket
title.
For this PR, the ratio is still 1:1 for tasks and executors for a
component, but not for the Storm before this PR [only for rebalance command].
For the old storm, The key here is that TOPOLOGY-TASKS is not changed for a
component when we do rebalance, we only change the executors number. Thus, when
we rebalance a smaller executors number for a component, the old bigger
TOPOLOGY-TASKS is partitioned into smaller number of executors, it works [we
finally reduce the executors], but some executors will have more than one
tasks; When we rebalance a bigger executors number for a component, it doesn't
work at all because the old smaller TOPOLOGY-TASKS is partitioned into bigger
number of executors, so some executors will not have task assigned and will not
start.
For example, for the old storm, if we have a topology named
example-topology which contains component like Spout S1[1 executors] -- Bolt
B1[2 executors] -- Bolt B2[4 executors], if we do a command `storm rebalance
example-topology -e B1=1` it will work, and the only executor for B1 will have
2 tasks inside; but for command `storm rebalance example-topology -e B1=4`, it
doesn't work at all and nothing changes finally.
For this PR, all the commands above work, and the ratio for tasks and
executors of a component is always 1:1
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---