Java client index update is threaded - problem when used in Lotes Notes


(David Marko) #1

I'm trying to use ElasticSearch in my web application built on IBM Domino
server(formerly Lotus Notes server). I'm using JAVA Client API ...
fetching items is fine but I have a problems with scheduled process that
is responsible for index updates in Elastic. Update finishes fine but the
scheduled process ends with message that it can't clean up all threads(and
doesnt run anymore until I restart the server). I found that
client.prepareIndex().execute() runs in sepearate threads that probably
causes the problems Is there a way how to disable this behaviour or how to
wait on all threads to complete? I tried .setOperationThreaded(false) but
it doesnt work for me(also docs says it works only for local calls but I'm
using TransportClient)

Any idea how to solve this?

Thanks,
David


(Shay Banon) #2

The client itself is threaded because of the networking layer (netty), no
way around it. If it does not allow for threads, then you might need to go
through the http REST endpoint.

On Thu, Dec 1, 2011 at 5:31 PM, David Marko dmarko484@gmail.com wrote:

I'm trying to use ElasticSearch in my web application built on IBM Domino
server(formerly Lotus Notes server). I'm using JAVA Client API ...
fetching items is fine but I have a problems with scheduled process that
is responsible for index updates in Elastic. Update finishes fine but the
scheduled process ends with message that it can't clean up all threads(and
doesnt run anymore until I restart the server). I found that
client.prepareIndex().execute() runs in sepearate threads that probably
causes the problems Is there a way how to disable this behaviour or how to
wait on all threads to complete? I tried .setOperationThreaded(false) but
it doesnt work for me(also docs says it works only for local calls but I'm
using TransportClient)

Any idea how to solve this?

Thanks,
David


(David Marko) #3

Anyone have some tip for JAVA REST library that fits ElasticSearch well? Is
there anyone who uses java rest when talking to ES?

David


(system) #4