storm-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Parfitt <diparf...@gmail.com>
Subject Re: Concurrent Modification Exception
Date Thu, 18 Dec 2014 15:47:49 GMT
What does your tuple look like and what are you emitting from your bolt?

On Thu, Dec 18, 2014 at 10:10 AM, Alperen INAL <alperen.inal@egemsoft.net>
wrote:
>
>   Thanks Dave,
>
>  But I already checked that page. As it is said my bolt is not modifying
> this object. It only calls that function on execute method. I didn’t
> understand what could be the problem about mutability or immutability on
> this case.
>
>     [image: cid:FC372AEC-3E4D-4AE3-B374-D1E6659FD376]
>
>
>
> *Alperen İNAL*
>
>
>
> *T  :* 0 216 474 44 88
> *F  :* 0 216 474 44 90
>
> alperen.inal@egemsoft.net
>
>
>
>
> * EGEM Bilgi İletişim Ticaret A.Ş. *Altunizade Mah. Kısıklı Cad. N:3 D:5
> Tekin Ak İş Merkezi
> 34662 Üsküdar İSTANBUL
>
> http://www.egemsoft.net
>
>
>   From: Dave Parfitt <diparfitt@gmail.com>
> Reply-To: <user@storm.apache.org>
> Date: Thu, 18 Dec 2014 10:02:32 -0500
> To: <user@storm.apache.org>
> Subject: Re: Concurrent Modification Exception
>
>  see [0] for more info on ConcurrentModificationExceptions.
>
>
>  Cheers -
> Dave
>
>  [0] https://storm.apache.org/documentation/Troubleshooting.html
>
> On Thu, Dec 18, 2014 at 9:54 AM, Alperen INAL <alperen.inal@egemsoft.net>
> wrote:
>>
>>   Hello all,
>>
>>  I am struggling with a Concurrent Modification problem on storm. I
>> tried many things about this exception such as using ConcurrentHashMap or
>> iterating by iterator on copyMap but no one is worked for me. I call the
>> function in my bolt and get ConcurrentModificationException. Here is my
>> function and it gives me this exception on line (dummy.putAll(record)). And
>> Previous Bolt is emiting the tuple as synchronizedMap.
>> Storm version:0.9.3
>> What do you suggest me on that?
>>
>> public String getScript(String eventType, Map<Object, Object> record) {
>>     Map<Object,Object> dummy = new HashMap<>();
>>     dummy.putAll(record);
>>     String script = String.format("stream=%s", eventType);
>>     for (Iterator<Object> keys = dummy.keySet().iterator(); keys.hasNext();)
{
>>         Object key = keys.next();
>>         script = script.concat("," + String.valueOf(key) + "=" + String.valueOf(dummy.get(key)));
>>     }
>>     return script;
>> }
>>
>>  Thanks a lot.
>>
>>     [image: cid:FC372AEC-3E4D-4AE3-B374-D1E6659FD376]
>>
>>
>>
>> *Alperen İNAL*
>>
>>
>>
>> *T  :* 0 216 474 44 88
>> *F  :* 0 216 474 44 90
>>
>> alperen.inal@egemsoft.net
>>
>>
>>
>>
>> * EGEM Bilgi İletişim Ticaret A.Ş. *Altunizade Mah. Kısıklı Cad. N:3 D:5
>> Tekin Ak İş Merkezi
>> 34662 Üsküdar İSTANBUL
>>
>> http://www.egemsoft.net
>>
>>
>
>  --
>  Dave
> https://github.com/metadave/
>
> --
> This message has been scanned for viruses and dangerous content.
>


-- 
Dave
https://github.com/metadave/

Mime
View raw message