You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Pete Prokopowicz <pe...@prokopowicz.org> on 2013/12/16 21:13:54 UTC
Confusion about wording in the manual section Concepts : Bolts
>From the section Concepts : Bolts:
"The main method in bolts is the execute method which takes in as input a
new tuple. Bolts emit new tuples using the
OutputCollector<
http://nathanmarz.github.com/storm/doc/backtype/storm/task/OutputCollector.html
>
object.
Bolts must call the ack method on the OutputCollector for every tuple they
process so that Storm knows when tuples are completed (and can eventually
determine that its safe to ack the original spout tuples). For the common
case of processing an input tuple, emitting 0 or more tuples based on that
tuple, and then acking the input tuple, Storm provides an
IBasicBolt<
http://nathanmarz.github.com/storm/doc/backtype/storm/topology/IBasicBolt.html
>
interface
which does the acking automatically."
How does IBasicBolt do the acking, since it is just an interface? Are
implementors of IBasicBolt guaranteed to be acked by the topology execution
mechanism (BasicBoltExecutor)? That should be made clearer here.
thanks!
-Pete Prokopowicz
Re: Confusion about wording in the manual section Concepts : Bolts
Posted by Jon Logan <jm...@buffalo.edu>.
It gets wrapped in an actual implementation, that calls ack after
delegating to the interface.
See backtype.storm.topology.BasicBoltExecutor#execute.
On Mon, Dec 16, 2013 at 3:13 PM, Pete Prokopowicz <pe...@prokopowicz.org>wrote:
> From the section Concepts : Bolts:
>
> "The main method in bolts is the execute method which takes in as input a
> new tuple. Bolts emit new tuples using the
> OutputCollector<
> http://nathanmarz.github.com/storm/doc/backtype/storm/task/OutputCollector.html
> >
> object.
> Bolts must call the ack method on the OutputCollector for every tuple they
> process so that Storm knows when tuples are completed (and can eventually
> determine that its safe to ack the original spout tuples). For the common
> case of processing an input tuple, emitting 0 or more tuples based on that
> tuple, and then acking the input tuple, Storm provides an
> IBasicBolt<
> http://nathanmarz.github.com/storm/doc/backtype/storm/topology/IBasicBolt.html
> >
> interface
> which does the acking automatically."
>
> How does IBasicBolt do the acking, since it is just an interface? Are
> implementors of IBasicBolt guaranteed to be acked by the topology execution
> mechanism (BasicBoltExecutor)? That should be made clearer here.
>
> thanks!
> -Pete Prokopowicz
>