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/
