Hi, 


I'm having trouble understanding how naming works in trident. 
Could someone please explain to me how the names are actually chosen based on 
my DRPC topology ? 

Stream stream1= topology.newDRPCStream(TOPOLOGY, drpc) 
.name("A") 
.each( Bolt ) 
.name("B") 
.each( Bolt ) 
.name("C") 
.each( Bolt ) 
.name("D") 
.each( Bolt ) 
.name("E") 
.each( Bolt ) 
.name("F") 
.each( Filter ) 
.name("G") 
.each( Bolt ) 
.name("H"); 

Stream stream2 = stream1 
.each( Filter ) 
.groupBy(...) 
.name("I1") 
.aggregate( 
new Count(), 
new Fields("aggregateValue") 
) 
.name("J1"); 

Stream stream3 = stream1 
.each( Filter ) 
.name("I2") 
.each( Bolt ) 
.groupBy(...) 
.name("J2") 
.aggregate( 
new Fields("decimalValue"), 
new Sum(), 
new Fields("aggregateValue") 
) 
.name("L"); 

topology 
.merge( 
stream2 .project(...) .name("M1"), 
stream3 .project(...) .name("M2") 
) 
.groupBy(...) 
.name("N") 
.aggregate( 
AggregatorThatReturnsJson 
) 
.name("O") 
.project(new Fields("result")) 
.name("P"); 

And here's what Storm UI shows me: 


b-0-A-B-C-D-E-F-G-H-I1-H-I2-J2 
b-1-I1-J2-J1-L-M1-M2-N 
b-2 
b-3 
b-4-N-O 

What are those two additionnal bolts (b-2 and b-3) i wasn't able to name ? 
How comes that b-1 contains parts from both stream2 and stream3 ? 

Where should i put the "names" so that i clearly know what is done in a bolt or 
an other ? 

Thanks for your help. 
Regards, 

Laurent 

Reply via email to