You are viewing a plain text version of this content. The canonical link for it is here.
Posted to client-dev@cassandra.apache.org by "Christopher J. Bottaro" <cj...@alumni.cs.utexas.edu> on 2013/08/29 00:35:06 UTC

Node discovery/status

Hello,

I'm writing a client for the CQL binary protocol.  Is there a way to
connect to a single node, then ask it for all the other nodes in the
cluster?  That way the application code doesn't have to know about all the
nodes when instantiating an instance of the client.

On a somewhat related note, what is the difference between the
TOPOLOGY_CHANGE/REMOVED_NODE and STATUS_CHANGE/DOWN events? Doesn't one
kind of imply the other?

Thanks for the help.

Re: Node discovery/status

Posted by Sylvain Lebresne <sy...@datastax.com>.
>
> I'm writing a client for the CQL binary protocol.  Is there a way to
> connect to a single node, then ask it for all the other nodes in the
> cluster?


Yes, though it's not so much part of the binary protocol than of CQL.
That is, you can query the peers system tables to get basically
what the node knows about the other nodes.


> On a somewhat related note, what is the difference between the
> TOPOLOGY_CHANGE/REMOVED_NODE and STATUS_CHANGE/DOWN events? Doesn't one
> kind of imply the other?
>

The topology_change events are for when the node join (as in is
bootstrapped) or leave (as in is
decommissioned) the cluster. The DOWN (resp. UP) event is send every time a
node is detected
as down (resp. up) by the cluster. The topology change events pretty much
imply the corresponding
status changes ones (a node that just joined is UP and one that has been
decommissioned should
be considered DOWN).

--
Sylvain