are you sure you don't have some map in the previous spout/bolt that you keep updating and resending? This would cause the problem in that the previous component is updating the object while the downstream component is trying to read it.
On Thu, Dec 18, 2014 at 10:47 AM, Dave Parfitt <[email protected]> wrote: > > 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 <[email protected]> > 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 >> >> [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 >> >> >> From: Dave Parfitt <[email protected]> >> Reply-To: <[email protected]> >> Date: Thu, 18 Dec 2014 10:02:32 -0500 >> To: <[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]> >> 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 >>> >>> [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 >>> >>> >> >> -- >> Dave >> https://github.com/metadave/ >> >> -- >> This message has been scanned for viruses and dangerous content. >> > > > -- > Dave > https://github.com/metadave/ >
