Hi Lorenz and thanks for your reply.
I've just checked your suggestions and indeed the prepare() method gets
invoked for both spouts and bolts.
Furthermore, it seems that the emit() method gets invoked when either a
bolt or a spout emits a tuple.
Best,
Leonardo
On 13/10/2014 11:49, Lorenz Fischer wrote:
Hi Leonardo
I was confused by this as well. I did some testing and saw that the
ITaskHook.emit(EmitInfo) method gets called when you call the
SpoutOutputCollector.emit() method and the Storm daemon calls the
ITaskHook.prepare(Map,TopologyContext) for both types of tasks (spout
and bolt). You can figure out which component the hook is being
initialized for by calling context.getThisComponentId().
Cheers,
Lorenz
On Fri, Oct 3, 2014 at 6:16 PM, Leonardo Aniello
<[email protected] <mailto:[email protected]>> wrote:
Hello everybody,
I've noticed that the ITaskHook interface doesn't provide any
method to hook to spout's open() and nextTuple() methods.
Why? Are there alternative ways to hook to these methods?
Thanks and Best Regards,Leonardo Aniello