Commit 8e92626a authored by Michael Ott's avatar Michael Ott
Browse files

Revert "Whitelist only the specified Cassandra server for connections" to...

Revert "Whitelist only the specified Cassandra server for connections" to support the Murmur3 Partitioner used in ScyllaDB

This reverts commit d153944d.
parent 2b963314
......@@ -29,7 +29,6 @@
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <boost/asio.hpp>
#include "cassandra.h"
......@@ -400,27 +399,12 @@ bool ConnectionImpl::connect() {
if (username_.size() && password_.size()) {
cass_cluster_set_credentials(cluster, username_.c_str(), password_.c_str());
cass_cluster_set_num_threads_io(cluster, numThreadsIo);
cass_cluster_set_queue_size_io(cluster, queueSizeIo);
cass_cluster_set_core_connections_per_host(cluster, coreConnPerHost);
cass_cluster_set_request_timeout(cluster, 60000);
boost::asio::io_service io_service;
boost::asio::ip::tcp::resolver resolver(io_service);
boost::asio::ip::tcp::resolver::query query(hostname_, std::to_string(port_));
boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(query);
boost::asio::ip::tcp::resolver::iterator end;
std::string whitelist;
while (iter != end) {
if (whitelist.size() > 0) {
cass_cluster_set_whitelist_filtering(cluster, whitelist.c_str());
/* Force protcol version to 4 */
cass_cluster_set_protocol_version(cluster, 4);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment