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]>
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
>

Reply via email to