You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Hong Jeon <hj...@cornell.edu> on 2015/07/24 22:18:41 UTC

OutputCollector.emit() problems

Hi,

Lets say I have a Bolt that spawns a separate thread in it that handles all
of the emits and acks. This has worked without errors (I assume since emits
and acks are still on one thread) but, I began seeing a
NullPointerException ever since I started using a MetricsConsumer. I am
thinking that the daemon for sending out built in metrics is also using
emits on the same OutputCollector, and since my emits are coming from a
custom thread (and not the Bolt itself), there is some synchronization
issues going on.

Do you guys think this is a likely cause of the NullPointerException?
And if so, does that mean we can only emit from the Bolt itself when using
MetricsConsumer?

Help is much appreciated. Thanks in advance.

Best,
Hong Jeon

Re: OutputCollector.emit() problems

Posted by Hong Jeon <hj...@cornell.edu>.
I'm sure that causes a NullpointerException. Why do you ask?

On Fri, Jul 24, 2015 at 4:55 PM, Javier Gonzalez <ja...@gmail.com> wrote:

> Have you tried using the same collector in the thread and the bolt?
> On Jul 24, 2015 4:20 PM, "Hong Jeon" <hj...@cornell.edu> wrote:
>
>> Hi,
>>
>> Lets say I have a Bolt that spawns a separate thread in it that handles
>> all of the emits and acks. This has worked without errors (I assume since
>> emits and acks are still on one thread) but, I began seeing a
>> NullPointerException ever since I started using a MetricsConsumer. I am
>> thinking that the daemon for sending out built in metrics is also using
>> emits on the same OutputCollector, and since my emits are coming from a
>> custom thread (and not the Bolt itself), there is some synchronization
>> issues going on.
>>
>> Do you guys think this is a likely cause of the NullPointerException?
>> And if so, does that mean we can only emit from the Bolt itself when
>> using MetricsConsumer?
>>
>> Help is much appreciated. Thanks in advance.
>>
>> Best,
>> Hong Jeon
>>
>

Re: OutputCollector.emit() problems

Posted by Javier Gonzalez <ja...@gmail.com>.
Have you tried using the same collector in the thread and the bolt?
On Jul 24, 2015 4:20 PM, "Hong Jeon" <hj...@cornell.edu> wrote:

> Hi,
>
> Lets say I have a Bolt that spawns a separate thread in it that handles
> all of the emits and acks. This has worked without errors (I assume since
> emits and acks are still on one thread) but, I began seeing a
> NullPointerException ever since I started using a MetricsConsumer. I am
> thinking that the daemon for sending out built in metrics is also using
> emits on the same OutputCollector, and since my emits are coming from a
> custom thread (and not the Bolt itself), there is some synchronization
> issues going on.
>
> Do you guys think this is a likely cause of the NullPointerException?
> And if so, does that mean we can only emit from the Bolt itself when using
> MetricsConsumer?
>
> Help is much appreciated. Thanks in advance.
>
> Best,
> Hong Jeon
>