1

From this documentation link I could learn that re-balancing a topology is easy with below command

storm rebalance mytopology -n 5 -e blue-spout=3 -e yellow-bolt=10

But how do I re-balance a trident topology as in trident topology we can't label filters/Functions(bolts) with name, So how can I increase/decrease parallelism count ? Or Is there a way to increase/decrease parallelism count using multiplier for all components in a specific topology ?

Matthias J. Sax
  • 59,682
  • 7
  • 117
  • 137
Aride Chettali
  • 181
  • 1
  • 7

1 Answers1

2

Let me answer my own questions;

In case of Trident spouts and bolts are automatically named and the names are b-0,b-1,b-2. This stands for Blot-1 and Bolt-2. These name can be figured out in the Storm UI for a deployed topology

Now using these bolts names we can rebalance a deployed topology.

storm rebalance mytopology -n 5 -e b-0=3 -e b-1=10

NOTE: You can also name a bolt while creating a Trident Topology

eg;

 topology.newStream("spout", spout)
         .each(new Fields("sentence"), new Split(), new Fields("word"))
         .shuffle()
         .name("BOLT-NAME") 
Aride Chettali
  • 181
  • 1
  • 7