You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by clay teahouse <cl...@gmail.com> on 2015/02/07 13:13:55 UTC

Do I need to synchronize emits?

Hi All,

 I emit my tuples in batches. Do I need to put the emit in a synchronized
block? The reason I am asking, I am getting the IndexOutOfBoundsException
error once in a while, especially with a high paralleliziation hint.
According to this link, it is a bug in storm, but I am using the latest
storm package.

http://stackoverflow.com/questions/19632287/indexoutofboundsexception-in-shuffle-grouping


thanks
Clay

Re: Do I need to synchronize emits?

Posted by clay teahouse <cl...@gmail.com>.
I don't initiate any thread. I only use the execute method of the bolt,
with some high number of parallelization hint.

On Mon, Feb 9, 2015 at 9:24 AM, Bobby Evans <ev...@yahoo-inc.com> wrote:

> If you are emitting from multiple threads then, yes you need to
> synchronize around the emit call.  This is not a typical use case so we do
> not synchronize by default.
>
> - Bobby
>
>
>   On Sunday, February 8, 2015 4:01 AM, clay teahouse <
> clayteahouse@gmail.com> wrote:
>
>
> Hi All,
>
> I emit my tuples in batches. Do I need to put the emit in a synchronized
> block? The reason I am asking, I am getting the IndexOutOfBoundsException
> error once in a while, especially with a high paralleliziation hint.
> According to this link, it is a bug in storm, but I am using the latest
> storm package.
>
>
> http://stackoverflow.com/questions/19632287/indexoutofboundsexception-in-shuffle-grouping
>
>
> thanks
> Clay
>
>
>

Re: Do I need to synchronize emits?

Posted by Bobby Evans <ev...@yahoo-inc.com>.
If you are emitting from multiple threads then, yes you need to synchronize around the emit call.  This is not a typical use case so we do not synchronize by default. - Bobby
 

     On Sunday, February 8, 2015 4:01 AM, clay teahouse <cl...@gmail.com> wrote:
   

 Hi All,

 I emit my tuples in batches. Do I need to put the emit in a synchronized
block? The reason I am asking, I am getting the IndexOutOfBoundsException
error once in a while, especially with a high paralleliziation hint.
According to this link, it is a bug in storm, but I am using the latest
storm package.

http://stackoverflow.com/questions/19632287/indexoutofboundsexception-in-shuffle-grouping


thanks
Clay


   

Re: Do I need to synchronize emits?

Posted by Bobby Evans <ev...@yahoo-inc.com.INVALID>.
If you are emitting from multiple threads then, yes you need to synchronize around the emit call.  This is not a typical use case so we do not synchronize by default. - Bobby
 

     On Sunday, February 8, 2015 4:01 AM, clay teahouse <cl...@gmail.com> wrote:
   

 Hi All,

 I emit my tuples in batches. Do I need to put the emit in a synchronized
block? The reason I am asking, I am getting the IndexOutOfBoundsException
error once in a while, especially with a high paralleliziation hint.
According to this link, it is a bug in storm, but I am using the latest
storm package.

http://stackoverflow.com/questions/19632287/indexoutofboundsexception-in-shuffle-grouping


thanks
Clay


   

Re: Do I need to synchronize emits?

Posted by Harsha <st...@harsha.io>.
Hi Clay, I don't think there is a JIRA open for this. Can you please
open one and include steps to reproduce. Thanks, Harsha


On Sat, Feb 7, 2015, at 04:13 AM, clay teahouse wrote:
> Hi All,
>
> I emit my tuples in batches. Do I need to put the emit in a
> synchronized block? The reason I am asking, I am getting the
> IndexOutOfBoundsException error once in a while, especially with a
> high paralleliziation hint. According to this link, it is a bug in
> storm, but I am using the latest storm package.
>
> http://stackoverflow.com/questions/19632287/indexoutofboundsexception-in-shuffle-grouping
>
>
> thanks Clay
>