You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Raymond Conn <ra...@gmail.com> on 2015/10/01 00:23:17 UTC

Re: Emit events from hook

Hi all,
Just wanted to follow up here. Is there anyway to emit tuples from within a
Hook?

Thanks,
Ray

On Wed, Sep 9, 2015 at 7:35 PM, Raymond Conn <ra...@gmail.com>
wrote:

> Hi all,
> I was wondering if there is anyway to emit events from a Hook. It doesn't
> look like the prepare method of the ITaskHook interface takes an
> OutputCollector. Is there a different way to emit events to a bolt from a
> Hook?
>
> Thanks,
> Ray
>

Re: Emit events from hook

Posted by "Matthias J. Sax" <mj...@apache.org>.
Hi,

I never tried it, but as you add a hook in Bolt.prepare() you should be
able to create your own hook class that takes the OutputCollector as
constructor parameter and use it later on when the hook is called.

-Matthias


On 10/01/2015 12:23 AM, Raymond Conn wrote:
> Hi all,
> Just wanted to follow up here. Is there anyway to emit tuples from
> within a Hook?
> 
> Thanks,
> Ray
> 
> On Wed, Sep 9, 2015 at 7:35 PM, Raymond Conn <raymond.conn90@gmail.com
> <ma...@gmail.com>> wrote:
> 
>     Hi all,
>     I was wondering if there is anyway to emit events from a Hook. It
>     doesn't look like the prepare method of the ITaskHook interface
>     takes an OutputCollector. Is there a different way to emit events to
>     a bolt from a Hook?
> 
>     Thanks,
>     Ray
> 
>