Hi,

I set the parallelism of a bolt to 3 with the java code: 
    builder.setBolt("myBolt", myBolt, 3);

I think, 3 myBolt instances would be created in 3 tasks each of which would run 
in a different thread (i.e. executor) in parallel. To prove that,  I printed 
out the bolt instance name in the prepare() method of MyBolt class, expecting 3 
different instance names in the worker log files.

However, things did not always go like that. I tested twice, the second 
topology worked as I expected. But in the first topology, 6701,6702,6703 ports 
were assigned to "myBolt", and I found the exactly same bolt instance name in 
worker-6701.log and worker-6702.log files, which were different from  
worker-6703.log file. 

So how to explain this?



Hao Yu

Reply via email to