Hi!
Is it possible to reuse NodeClient inside prepareRequest plugin method? I want to pin it inside my native code. Will it be safe to use it across multiple threads inside jni or I should every time use new provided client?
Hi!
Is it possible to reuse NodeClient inside prepareRequest plugin method? I want to pin it inside my native code. Will it be safe to use it across multiple threads inside jni or I should every time use new provided client?
Yep, the NodeClient (and TransportClient) is thread safe, so you can share it between multiple threads. That's the preferred way, to reduce overhead and chattiness with the cluster.
Thanks!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.