On 03/04/2014 12:28 PM, Check Peck wrote:
I guess you are not right.. Cluster.builder.addContactPoint(...) will
add nodes in the connection pool.. And it will discover all the other
nodes in the connection pool automatically.. To filter out nodes only
for local colo we need to use to different settings in Java driver..

In both the python and java drivers, I found DCAwareRoundRobinPolicy which appears to have the functionality you are looking for.

http://datastax.github.io/python-driver/api/cassandra/policies.html#cassandra.policies.DCAwareRoundRobinPolicy

There should be similar stuff in cpp driver as well..

I'm sure it's on the roadmap, if it is not in there already - I may just not be finding a datacenter aware policy in the source. The C++ driver is under heavy development and is not as featured as the python and java drivers, yet, so you may want to consider one of the other drivers if you have an immediate need. I'm sure they would enjoy getting a patch for a dc aware policy or at least a feature request for this, if you have the time to hit up JIRA - https://datastax-oss.atlassian.net/browse/CPP

--
Kind regards,
Michael

Reply via email to