Yes. So the more nodes your transport client is aware of, the more chance you will have to be able to start your app.
Sniff option let the user decide if your app will only work with given addresses (default to false) or if once started, the TransportClient will ask to the master node information about other nodes and will connect then to them.
If you need auto discovering without giving nodes address, only using the cluster name, you have to use a NodeClient.
Documentation here explain that: Elasticsearch Platform — Find real-time answers at scale | Elastic
Does it help?
Le 29 janv. 2013 à 09:16, Ron Sher ron.sher@gmail.com a écrit :
yes, but that could be true for any combination of 2 servers I choose.
Isn't there any way to make the client automatically discover other servers?
What exactly does the sniff option do?
Thanks again for your help,
Ron
On Mon, Jan 28, 2013 at 9:35 PM, David Pilato david@pilato.fr wrote:
Imagine you have a webapp with a transport client to your cluster of 20 nodes.
You shutdown the web app for maintenance and restart it.
But, in your cluster, your node 1 is not working.
When you restart your webapp, it will try to connect to node1 but will fail. Your webapp does not know other nodes yet as you did not give another node address.
So you have a cluster with 19 nodes working but you won't be able to provide search for your users.
Make sense?
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 28 janv. 2013 à 16:40, Ron Sher ron.sher@gmail.com a écrit :
Thanks again for your quick reply.
Could you please elaborate a bit? Why would you recommend using more nodes if they are automatically discovered?
What should be the consideration to use, or not to use, sniffing?
Thanks,
Ron
On Mon, Jan 28, 2013 at 5:05 PM, David Pilato david@pilato.fr wrote:
Yes. Set it to true and it will detect and use other nodes as well.
That said, I recommend to start with at least two nodes defined in the TransportClient.
David.
Le 28 janv. 2013 à 15:58, Ron Sher ron.sher@gmail.com a écrit :
Thanks for the quick reply.
What happens when I supply only 1 address? Will the client automatically use other servers in the cluster also?
What's the meaning of the "client.transport.sniff"?
Will it only find out other servers if I set this to true?
Thanks again,
Ron
On Mon, Jan 28, 2013 at 1:25 PM, David Pilato david@pilato.fr wrote:
You have to know at least one address when using transport client.
What you are probably after, is to get a Client from a client only node.
Just start a client only node. It will be part of the cluster but won't hold data.
Then ask for a Client from that node.
HTH
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 28 janv. 2013 à 11:11, Ron Sher ron.sher@gmail.com a écrit :
Hi,
I have several environments (test & production) that have elasticsearch clusters.
I would like to use the TransportClient and give it the cluster name and have it figure out automatically which servers exist in each cluster.
When I don't supply the servers explicitly (by using addTransportAddress) I get an exception:
org.elasticsearch.client.transport.NoNodeAvailableException: No node available
Tried setting .put("discovery.enabled", true), but that didn't seem to help.
Is there a way to do that?
I don't want to use the node client since I have many clients (this is part of a mapreduce job)
Thanks for you help,
Ron
--
--
--
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.