I have some questions about Elasticsearch and Apache Strom.
First, I insert some data to ElasticSearch in Strom bolt typle by tuple.
After that, I want to read the count of that Data I inserted by ElasticSearch query( like "_count?q=body:error...")
but,
when I use JAVA API - CountResponse or MultiSearchResponse in Storm bolt,
- it execute sometimes sucessful or fail.
- Elastic Search cannot read the data just after I insert.
when it was fail, (I implemented Java api in ZEsCountBolt.java)
-
error occurs : node = nodeBuilder().node();
console
org.elasticsearch.ElasticsearchTimeoutException: Interrupted while waiting for initial discovery state
at org.elasticsearch.discovery.DiscoveryService.waitForInitialState(DiscoveryService.java:95)
at org.elasticsearch.node.internal.InternalNode.start(InternalNode.java:265)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at storm.starter.bolt.ZEsCountBolt.prepare(ZEsCountBolt.java:51)
at backtype.storm.topology.BasicBoltExecutor.prepare(BasicBoltExecutor.java:43)
at backtype.storm.daemon.executor$fn__3439$fn__3451.invoke(executor.clj:692)
at backtype.storm.util$async_loop$fn__460.invoke(util.clj:461)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Unknown Source) -
error occurs : .execute().actionGet();
console
org.elasticsearch.ElasticsearchIllegalStateException: Future got interrupted
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:47)
at storm.starter.bolt.ZEsCountBolt.prepare(ZEsCountBolt.java:109)
at backtype.storm.topology.BasicBoltExecutor.prepare(BasicBoltExecutor.java:43)
at backtype.storm.daemon.executor$fn__3439$fn__3451.invoke(executor.clj:692)
at backtype.storm.util$async_loop$fn__460.invoke(util.clj:461)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(Unknown Source)
at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:278)
at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:117)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:45)
... 6 more