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.
[cid:FC372AEC-3E4D-4AE3-B374-D1E6659FD376] Alperen İNAL T : 0 216 474 44 88 F : 0 216 474 44 90 [email protected] 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<http://www.egemsoft.net/> From: Dave Parfitt <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Thu, 18 Dec 2014 10:02:32 -0500 To: <[email protected]<mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>> 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. [cid:FC372AEC-3E4D-4AE3-B374-D1E6659FD376] Alperen İNAL T : 0 216 474 44 88 F : 0 216 474 44 90 [email protected]<mailto:[email protected]> 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<http://www.egemsoft.net/> -- Dave https://github.com/metadave/ -- This message has been scanned for viruses and dangerous content.
