0

I have checked this How does Storm handle fields grouping when you add more nodes?

However my question is: For instance, once bob goes to one task he'll always go to the same one, let say, the task id is X. When I add new nodes, then more new thread and new task will be started in new nodes? If it is, bob would go to the new thread, and the NEW task? If it is not like this, then there would be threads started in new nodes?

i am Storm fresher and hope i described my doubt clearly.

Lander
  • 11
  • 2

1 Answers1

0

The number of tasks in a topology does not change once the topology is deployed. Please see https://storm.apache.org/releases/2.0.0-SNAPSHOT/Understanding-the-parallelism-of-a-Storm-topology.html to better understand the difference between tasks and threads.

For your example, say Bob goes to task X running in an executor in worker Z. When you add new nodes (and trigger a rebalance), it's possible task X is assigned to a different executor on worker Y. I believe what will happen is that Storm will stop the spouts for your topology during the rebalance, wait for a bit for the currently emitted tuples to finish processing, restart the Z worker with its new assignment (without X) and also start worker Y with the assignment containing X.

Next time Bob is processed, it will go to task X as usual, the task is just running somewhere else now.

Stig Rohde Døssing
  • 3,621
  • 2
  • 7
  • 7