Hi.

I have two questions.

First, it is about "Partial Key grouping" & "Fields Grouping".

In my examples, I used employee class which has "name", "phonenumber",
"salary" as tuple to send next worker.
I only used "name" as key for groupings.

Fields Grouping works as what I expected.
Based on "Fields" values, it sends tuples to a next hop.
However, Partial Key grouping did not work what I expected.
Below are outputs from programs.


# From fieldsgrouping
# First node
Mike 12345 13451
David 12345 13451
Andy 12345 13451
Junguk 12345 13452
Mike 12345 13452
David 12345 13452
Andy 12345 13452

# Second node
Bob 12345 13451
Bob 12345 13452


#From partial key grouping
# First node
Mike 12345 13451
David 12345 13451
Mike 12345 13452
Bob 12345 13452

# Second node
Junguk 12345 13451
Bob 12345 13451
Andy 12345 13451
Junguk 12345 13452
David 12345 13452
Andy 12345 13452

In partial key grouping, the same fields (name) sometimes go to first and
second node even though I used "name" as partial  key grouping fields.
Is it right behavior?
Or when we use partial key grouping, does it need other nodes to aggregate
information from one first and second nodes?

# Second question
It is about "guaranteeing message processing"
If I want to make a topology reliable,
first in spout,  I used  *emit
<https://nathanmarz.github.io/storm/doc/backtype/storm/spout/SpoutOutputCollector.html#emit(java.util.List,
java.lang.Object)>*(java.util.List<java.lang.Object> tuple,
java.lang.Object messageId) method from SpoutOUtputCollector
and then in bolts,   I used collector.emit(Tuple ahchor, List<Object>
tuple).

When I used WordCountExample, if errors happen in "Count" bolt, how does
"fail" from Count bolt forward to spout?

1) Count bolt sends "fail" to previous bolt (split) and then split bolt
sends it to "spout"
2) Count bolt directly sends "fail" to "spout"


Thanks in advance.
- Junguk

Reply via email to