Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Cassandra datacenter name in cqlsh

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

like image 201
palacsint Avatar asked Oct 21 '13 08:10

palacsint


People also ask

What is datacenter in Cassandra?

An Apache Cassandra Datacenter is a group of nodes, related and configured within a cluster for replication purposes. Setting up a specific set of related nodes into a datacenter helps to reduce latency, prevent transactions from impact by other workloads, and related effects.


1 Answers

cqlsh> use system; cqlsh:system> select data_center from local;  data_center ------------- datacenter1  
like image 64
palacsint Avatar answered Sep 24 '22 08:09

palacsint