You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to storm-user
Hi,
If I have multiple Bolts A and multiple Bolts B (with different
classes A.class and B.class) and I create the following grouping for
Bolt C:
C.fieldsGrouping("A", new Fields("my_field_name")).fieldsGrouping("B",
new Fields("my_field_name"))
will ALL tuples from A AND B that contain the field
my_field_name="zzz" go to the same instance of bolt C, or will they be
grouped by the source bolt?
TIA
Ben Hughes
unread,
Jan 11, 2012, 12:21:01 PM1/11/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to storm-user
Yes. The task that a tuple goes to is determined by the hashcode of
the fields in the grouping modulo the number of tasks in that bolt.
As long as all fields in the fields grouping are the same and they
return sensible, value based hashcodes, everything will work fine.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to storm...@googlegroups.com
Just to make sure what Ben is saying is clear, in a fields grouping a grouping value will always go to the same consumer task, regardless of the source. Otherwise things like joins of different streams would not be possible.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to storm...@googlegroups.com
In the exact example given above, can the two fields grouping have different stream Ids (or do they have to have the same one) if you want the same "my_field_name" to go to the same task regardless whether its sent from Bolt A or Bolt B?
Nathan Marz
unread,
Apr 28, 2012, 5:12:06 AM4/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to storm...@googlegroups.com
Yes they can have different stream ids. The fields grouping equation is hash(subset of tuple fields) % number of consumer tasks. So all that matters is the values of the fields being grouped on.
invader zim
unread,
Mar 14, 2013, 10:11:30 AM3/14/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message