camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akram <akram.s...@gmail.com>
Subject Concurrent modification while ingesting to elasticsearch
Date Wed, 14 Sep 2016 09:28:12 GMT
I have a route which will ingest data to elasticsearch. But it is throwing
concurrentModificationException while ingesting to elasticsearch

from("file://somefile") 
.multicast()
   
.to("seda:someroute?concurrentConsumers=8","seda:elasticsearchStore?concurrentConsumers=8");

from("seda:elasticsearchStore?concurrentConsumers=8") 
    .log("Ingesting to elasticsearch")
    .to("elasticsearch://cluster?operation=index&ip=localhost&port=9300""); 

from("seda:someroute?concurrentConsumers=8")
.to("someroute")

Below is the stacktrace for concurrent modification Exception

 elasticSearch:159 -       java.util.ConcurrentModificationException
        at
java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)
        at
java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:413)
        at
java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:412)
        at java.util.AbstractMap.toString(AbstractMap.java:518)
        at java.lang.String.valueOf(String.java:2849)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at
org.apache.camel.builder.BinaryPredicateSupport.matchesReturningFailureMessage(BinaryPredicateSupport.java:63)
        at
org.apache.camel.builder.BinaryPredicateSupport.matches(BinaryPredicateSupport.java:50)
        at
org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65)
        at
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
        at
org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:827)
        at
org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:85)
        at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:320)
        at
org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:305)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)






--
View this message in context: http://camel.465427.n5.nabble.com/Concurrent-modification-while-ingesting-to-elasticsearch-tp5787540.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message