Is it possible to discover list of nodes from another datacenter in a Cassandra cluster?
Let us say I have the following information:<ol> <li>My Cassandra cluster consists of multiple datacenters (say "dc1" and "dc2").</li> <li>I know an IP address of one of the nodes from, say, datacenter "dc1".</li> </ol>
datastax java library I have tried to do the following:
read list of peers directly from the
system.peers table - but it returns just a few of them (it was read with consistency level
ALL), all belonging to the "dc1";
cluster.getMetada().getAllHosts() - but it returns me a full list of hosts only within "dc1".
It looks like there is no way to get this information about other datacenter without knowing at least one node from the "dc2". Am I wrong?
There should be at least one seed by DC.
Attention: In multiple data-center clusters, include at least one node from each datacenter (replication group) in the seed list.