Getting Cassandra datacenter name in cqlsh

palacsint picture palacsint · Oct 21, 2013 · Viewed 12.4k times · Source

How can I get the name of the datacenter in cqlsh? It's required for the constructor of DCAwareRoundRobinPolicy.

Answer

palacsint picture palacsint · Oct 21, 2013
cqlsh> use system;
cqlsh:system> select data_center from local;

data_center
-------------
datacenter1