Vishal Sharma
Vishal Sharma

Reputation: 1750

Primary Local DC in Cassandra

Which one is the primary local datacenter in cassandra as mentioned in the description of "cass_cluster_set_load_balance_dc_aware" in https://datastax.github.io/cpp-driver/api/struct.CassCluster/

Upvotes: 1

Views: 553

Answers (1)

Alex Ott
Alex Ott

Reputation: 87174

You set it as 2nd parameter (local_dc) of the cass_cluster_set_load_balance_dc_aware function. You need to specify correct DC name from your cluster.

CassError cass_cluster_set_load_balance_dc_aware(CassCluster* cluster,
              const char* local_dc,
              unsigned used_hosts_per_remote_dc,
              cass_bool_t allow_remote_dcs_for_local_cl);

Upvotes: 2

Related Questions