Is it possible to discover list of nodes from another datacenter in a Cassandra cluster?
Let us say I have the following information:
- My Cassandra cluster consists of multiple datacenters (say "dc1" and "dc2").
- I know an IP address of one of the nodes from, say, datacenter "dc1".
Using the 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 levelALL
), all belonging to the "dc1";use
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?