Class: Ilios::Cassandra::Cluster
- Inherits:
-
Object
- Object
- Ilios::Cassandra::Cluster
- Defined in:
- ext/ilios/ilios.c
Constant Summary collapse
- PROTOCOL_VERSION_V1 =
INT2NUM(CASS_PROTOCOL_VERSION_V1)
- PROTOCOL_VERSION_V2 =
INT2NUM(CASS_PROTOCOL_VERSION_V2)
- PROTOCOL_VERSION_V3 =
INT2NUM(CASS_PROTOCOL_VERSION_V3)
- PROTOCOL_VERSION_V4 =
INT2NUM(CASS_PROTOCOL_VERSION_V4)
- PROTOCOL_VERSION_V5 =
INT2NUM(CASS_PROTOCOL_VERSION_V5)
- PROTOCOL_VERSION_DSEV1 =
INT2NUM(CASS_PROTOCOL_VERSION_DSEV1)
- PROTOCOL_VERSION_DSEV2 =
INT2NUM(CASS_PROTOCOL_VERSION_DSEV2)
- CONSISTENCY_ANY =
INT2NUM(CASS_CONSISTENCY_ANY)
- CONSISTENCY_ONE =
INT2NUM(CASS_CONSISTENCY_ONE)
- CONSISTENCY_TWO =
INT2NUM(CASS_CONSISTENCY_TWO)
- CONSISTENCY_THREE =
INT2NUM(CASS_CONSISTENCY_THREE)
- CONSISTENCY_QUORUM =
INT2NUM(CASS_CONSISTENCY_QUORUM)
- CONSISTENCY_ALL =
INT2NUM(CASS_CONSISTENCY_ALL)
- CONSISTENCY_LOCAL_QUORUM =
INT2NUM(CASS_CONSISTENCY_LOCAL_QUORUM)
- CONSISTENCY_EACH_QUORUM =
INT2NUM(CASS_CONSISTENCY_EACH_QUORUM)
- CONSISTENCY_SERIAL =
INT2NUM(CASS_CONSISTENCY_SERIAL)
- CONSISTENCY_LOCAL_SERIAL =
INT2NUM(CASS_CONSISTENCY_LOCAL_SERIAL)
- CONSISTENCY_LOCAL_ONE =
INT2NUM(CASS_CONSISTENCY_LOCAL_ONE)
Instance Method Summary collapse
-
#connect ⇒ Cassandra::Session
Connects a session.
-
#connect_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for connecting to a node.
-
#connection_heartbeat_interval(interval_secs) ⇒ Cassandra::Cluster
Sets the amount of time between heartbeat messages and controls the amount of time the connection must be idle before sending heartbeat messages.
-
#connection_idle_timeout(timeout_secs) ⇒ Cassandra::Cluster
Sets the amount of time a connection is allowed to be without a successful heartbeat response before being terminated and scheduled for reconnection.
-
#consistency(consistency) ⇒ Cassandra::Cluster
Sets the default consistency level of the statement.
-
#constant_reconnect(delay_ms) ⇒ Cassandra::Cluster
Configures the cluster to use a reconnection policy that waits a constant time between each reconnection attempt.
-
#constant_speculative_execution_policy(constant_delay_ms, max_speculative_executions) ⇒ Cassandra::Cluster
Enable constant speculative executions with the supplied settings.
-
#core_connections_per_host(num_connections) ⇒ Cassandra::Cluster
Sets the number of connections made to each server in each IO thread.
-
#credentials(username, password) ⇒ Cassandra::Cluster
Sets credentials for plain text authentication.
-
#exponential_reconnect(base_delay_ms, max_delay_ms) ⇒ Cassandra::Cluster
Configures the cluster to use a reconnection policy that waits exponentially longer between each reconnection attempt; however will maintain a constant delay once the maximum delay is reached.
-
#hosts(hosts) ⇒ Cassandra::Cluster
Sets the contact points.
-
#initialize ⇒ Cassandra::Cluster
constructor
Creates a new cluster.
-
#keyspace(keyspace) ⇒ Cassandra::Cluster
Sets the keyspace.
-
#latency_aware_routing(enabled) ⇒ Cassandra::Cluster
Configures the cluster to use latency-aware request routing or not.
-
#load_balance_dc_aware(local_dc) ⇒ Cassandra::Cluster
Configures the cluster to use DC-aware load balancing.
-
#load_balance_round_robin ⇒ Cassandra::Cluster
Configures the cluster to use round-robin load balancing.
-
#num_threads_io(num_threads) ⇒ Cassandra::Cluster
Sets the number of IO threads that will handle query requests.
-
#port(port) ⇒ Cassandra::Cluster
Sets the port number.
-
#protocol_version(version) ⇒ Cassandra::Cluster
Sets the protocol version.
-
#queue_size_io(queue_size) ⇒ Cassandra::Cluster
Sets the size of the fixed size queue that stores pending requests.
-
#request_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for waiting for a response from a node.
-
#resolve_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for waiting for DNS name resolution.
-
#serial_consistency(consistency) ⇒ Cassandra::Cluster
Sets the default serial consistency level of the statement.
-
#tcp_keepalive(enabled, delay_secs) ⇒ Cassandra::Cluster
Enables/Disables TCP keep-alive.
-
#tcp_nodelay(enabled) ⇒ Cassandra::Cluster
Enables/Disables Nagle's algorithm on the connections.
-
#token_aware_routing(enabled) ⇒ Cassandra::Cluster
Configures the cluster to use token-aware request routing or not.
-
#use_schema(enabled) ⇒ Cassandra::Cluster
Enables/Disables retrieving and updating schema metadata.
Constructor Details
#initialize ⇒ Cassandra::Cluster
Creates a new cluster.
61 62 63 64 65 66 67 68 69 |
# File 'ext/ilios/cluster.c', line 61
static VALUE cluster_initialize(VALUE self)
{
CassandraCluster *cassandra_cluster;
GET_UNINITIALIZED_CLUSTER(self, cassandra_cluster);
cassandra_cluster->cluster = cass_cluster_new();
return self;
}
|
Instance Method Details
#connect ⇒ Cassandra::Session
Connects a session.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'ext/ilios/cluster.c', line 78
static VALUE cluster_connect(VALUE self)
{
CassandraSession *cassandra_session;
CassandraCluster *cassandra_cluster;
CassFuture* connect_future;
VALUE cassandra_session_obj;
const char *keyspace = "";
GET_CLUSTER(self, cassandra_cluster);
if (cassandra_cluster->keyspace) {
keyspace = StringValueCStr(cassandra_cluster->keyspace);
}
cassandra_session_obj = CREATE_SESSION(cassandra_session);
cassandra_session->cluster_obj = self;
cassandra_session->session = cass_session_new();
connect_future = cass_session_connect_keyspace(cassandra_session->session, cassandra_cluster->cluster, keyspace);
nogvl_future_wait(connect_future);
if (cass_future_error_code(connect_future) != CASS_OK) {
VALUE error = ilios_future_error_new(eConnectError, "Unable to connect", connect_future);
cass_future_free(connect_future);
rb_exc_raise(error);
}
cass_future_free(connect_future);
return cassandra_session_obj;
}
|
#connect_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for connecting to a node.
Default is 5000 milliseconds.
209 210 211 212 213 214 215 216 217 |
# File 'ext/ilios/cluster.c', line 209
static VALUE cluster_connect_timeout(VALUE self, VALUE timeout_ms)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_connect_timeout(cassandra_cluster->cluster, cluster_value_to_uint(timeout_ms, "connect_timeout"));
return self;
}
|
#connection_heartbeat_interval(interval_secs) ⇒ Cassandra::Cluster
Sets the amount of time between heartbeat messages and controls the amount
of time the connection must be idle before sending heartbeat messages.
This is useful for preventing intermediate network devices from dropping connections.
Default is 30 seconds.
550 551 552 553 554 555 556 557 558 |
# File 'ext/ilios/cluster.c', line 550
static VALUE cluster_connection_heartbeat_interval(VALUE self, VALUE interval_secs)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_connection_heartbeat_interval(cassandra_cluster->cluster, cluster_value_to_uint(interval_secs, "connection_heartbeat_interval"));
return self;
}
|
#connection_idle_timeout(timeout_secs) ⇒ Cassandra::Cluster
Sets the amount of time a connection is allowed to be without a successful
heartbeat response before being terminated and scheduled for reconnection.
Default is 60 seconds.
569 570 571 572 573 574 575 576 577 |
# File 'ext/ilios/cluster.c', line 569
static VALUE cluster_connection_idle_timeout(VALUE self, VALUE timeout_secs)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_connection_idle_timeout(cassandra_cluster->cluster, cluster_value_to_uint(timeout_secs, "connection_idle_timeout"));
return self;
}
|
#consistency(consistency) ⇒ Cassandra::Cluster
Sets the default consistency level of the statement.
Default is CONSISTENCY_LOCAL_ONE.
362 363 364 365 366 367 368 369 370 371 |
# File 'ext/ilios/cluster.c', line 362
static VALUE cluster_consistency(VALUE self, VALUE consistency)
{
CassandraCluster *cassandra_cluster;
CassConsistency consistency_value = cluster_value_to_consistency(consistency, "consistency");
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_consistency(cassandra_cluster->cluster, consistency_value);
return self;
}
|
#constant_reconnect(delay_ms) ⇒ Cassandra::Cluster
Configures the cluster to use a reconnection policy that waits a constant time between each reconnection attempt. The exponential policy is used unless this method is called.
470 471 472 473 474 475 476 477 478 |
# File 'ext/ilios/cluster.c', line 470
static VALUE cluster_constant_reconnect(VALUE self, VALUE delay_ms)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_constant_reconnect(cassandra_cluster->cluster, cluster_value_to_uint64(delay_ms, "constant_reconnect"));
return self;
}
|
#constant_speculative_execution_policy(constant_delay_ms, max_speculative_executions) ⇒ Cassandra::Cluster
Enable constant speculative executions with the supplied settings.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'ext/ilios/cluster.c', line 262
static VALUE cluster_constant_speculative_execution_policy(VALUE self, VALUE constant_delay_ms, VALUE max_speculative_executions)
{
CassandraCluster *cassandra_cluster;
long delay = NUM2LONG(constant_delay_ms);
int max_executions = NUM2INT(max_speculative_executions);
if (delay < 0 || max_executions < 0) {
rb_raise(rb_eArgError, "Bad parameters.");
}
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_constant_speculative_execution_policy(cassandra_cluster->cluster, delay, max_executions), "constant_speculative_execution_policy");
return self;
}
|
#core_connections_per_host(num_connections) ⇒ Cassandra::Cluster
Sets the number of connections made to each server in each IO thread.
Default is 1.
451 452 453 454 455 456 457 458 459 |
# File 'ext/ilios/cluster.c', line 451
static VALUE cluster_core_connections_per_host(VALUE self, VALUE num_connections)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_core_connections_per_host(cassandra_cluster->cluster, cluster_value_to_uint(num_connections, "core_connections_per_host")), "core_connections_per_host");
return self;
}
|
#credentials(username, password) ⇒ Cassandra::Cluster
Sets credentials for plain text authentication.
285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'ext/ilios/cluster.c', line 285
static VALUE cluster_credentials(VALUE self, VALUE username, VALUE password)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
// The driver copies both strings into its own memory
// (cluster_config.cpp: cass_cluster_set_credentials_n), so the Ruby
// strings do not need to be retained.
cass_cluster_set_credentials(cassandra_cluster->cluster, StringValueCStr(username), StringValueCStr(password));
return self;
}
|
#exponential_reconnect(base_delay_ms, max_delay_ms) ⇒ Cassandra::Cluster
Configures the cluster to use a reconnection policy that waits
exponentially longer between each reconnection attempt; however
will maintain a constant delay once the maximum delay is reached.
This is the default policy, with a base delay of 2000 milliseconds and
a maximum delay of 60000 milliseconds.
494 495 496 497 498 499 500 501 502 |
# File 'ext/ilios/cluster.c', line 494
static VALUE cluster_exponential_reconnect(VALUE self, VALUE base_delay_ms, VALUE max_delay_ms)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_exponential_reconnect(cassandra_cluster->cluster, cluster_value_to_uint64(base_delay_ms, "exponential_reconnect base_delay_ms"), cluster_value_to_uint64(max_delay_ms, "exponential_reconnect max_delay_ms")), "exponential_reconnect");
return self;
}
|
#hosts(hosts) ⇒ Cassandra::Cluster
Sets the contact points.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'ext/ilios/cluster.c', line 114
static VALUE cluster_hosts(VALUE self, VALUE hosts)
{
CassandraCluster *cassandra_cluster;
long length;
GET_CLUSTER(self, cassandra_cluster);
Check_Type(hosts, T_ARRAY);
length = RARRAY_LEN(hosts);
if (length == 0) {
rb_raise(rb_eArgError, "No host exists.");
}
for (long i = 0; i < length && i < RARRAY_LEN(hosts); i++) {
VALUE host = rb_ary_entry(hosts, i);
cass_cluster_set_contact_points(cassandra_cluster->cluster, StringValueCStr(host));
}
return self;
}
|
#keyspace(keyspace) ⇒ Cassandra::Cluster
Sets the keyspace.
159 160 161 162 163 164 165 166 167 168 169 |
# File 'ext/ilios/cluster.c', line 159
static VALUE cluster_keyspace(VALUE self, VALUE keyspace)
{
CassandraCluster *cassandra_cluster;
StringValue(keyspace);
GET_CLUSTER(self, cassandra_cluster);
RB_OBJ_WRITE(self, &cassandra_cluster->keyspace, keyspace);
return self;
}
|
#latency_aware_routing(enabled) ⇒ Cassandra::Cluster
Configures the cluster to use latency-aware request routing or not.
Default is false (disabled).
641 642 643 644 645 646 647 648 649 |
# File 'ext/ilios/cluster.c', line 641
static VALUE cluster_latency_aware_routing(VALUE self, VALUE enabled)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_latency_aware_routing(cassandra_cluster->cluster, RTEST(enabled) ? cass_true : cass_false);
return self;
}
|
#load_balance_dc_aware(local_dc) ⇒ Cassandra::Cluster
Configures the cluster to use DC-aware load balancing. For each query, all live nodes in a primary 'local' DC are tried first, followed by any node from other DCs.
604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'ext/ilios/cluster.c', line 604
static VALUE cluster_load_balance_dc_aware(VALUE self, VALUE local_dc)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
// The 3rd and 4th parameters (used_hosts_per_remote_dc and
// allow_remote_dcs_for_local_cl) are deprecated in driver 2.16, so they
// are fixed to 0/cass_false and not exposed to Ruby.
cluster_check_error(cass_cluster_set_load_balance_dc_aware(cassandra_cluster->cluster, StringValueCStr(local_dc), 0, cass_false), "load_balance_dc_aware");
return self;
}
|
#load_balance_round_robin ⇒ Cassandra::Cluster
Configures the cluster to use round-robin load balancing. The driver discovers all nodes in a cluster and cycles through them per request.
585 586 587 588 589 590 591 592 593 |
# File 'ext/ilios/cluster.c', line 585
static VALUE cluster_load_balance_round_robin(VALUE self)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_load_balance_round_robin(cassandra_cluster->cluster);
return self;
}
|
#num_threads_io(num_threads) ⇒ Cassandra::Cluster
Sets the number of IO threads that will handle query requests.
Default is 1.
413 414 415 416 417 418 419 420 421 |
# File 'ext/ilios/cluster.c', line 413
static VALUE cluster_num_threads_io(VALUE self, VALUE num_threads)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_num_threads_io(cassandra_cluster->cluster, cluster_value_to_uint(num_threads, "num_threads_io")), "num_threads_io");
return self;
}
|
#port(port) ⇒ Cassandra::Cluster
Sets the port number.
Default is 9042.
143 144 145 146 147 148 149 150 151 |
# File 'ext/ilios/cluster.c', line 143
static VALUE cluster_port(VALUE self, VALUE port)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_port(cassandra_cluster->cluster, NUM2INT(port)), "port");
return self;
}
|
#protocol_version(version) ⇒ Cassandra::Cluster
Sets the protocol version. The driver will automatically downgrade to the lowest supported protocol version.
Default is PROTOCOL_VERSION_V4, or PROTOCOL_VERSION_DSEV1 against DSE.
The driver accepts PROTOCOL_VERSION_V3, PROTOCOL_VERSION_V4,
PROTOCOL_VERSION_DSEV1 and PROTOCOL_VERSION_DSEV2 only. It ignores
PROTOCOL_VERSION_V1 and PROTOCOL_VERSION_V2, which are below the lowest
version it supports, and PROTOCOL_VERSION_V5, which is a beta version it
enables through a separate setting instead. Each of those leaves the version
unchanged and is reported on the driver's error log.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'ext/ilios/cluster.c', line 186
static VALUE cluster_protocol_version(VALUE self, VALUE version)
{
CassandraCluster *cassandra_cluster;
int v = NUM2INT(version);
if (v < 0) {
rb_raise(rb_eRangeError, "Invalid protocol_version: %d", v);
}
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_protocol_version(cassandra_cluster->cluster, v);
return self;
}
|
#queue_size_io(queue_size) ⇒ Cassandra::Cluster
Sets the size of the fixed size queue that stores pending requests.
Default is 8192.
432 433 434 435 436 437 438 439 440 |
# File 'ext/ilios/cluster.c', line 432
static VALUE cluster_queue_size_io(VALUE self, VALUE queue_size)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cluster_check_error(cass_cluster_set_queue_size_io(cassandra_cluster->cluster, cluster_value_to_uint(queue_size, "queue_size_io")), "queue_size_io");
return self;
}
|
#request_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for waiting for a response from a node.
Default is 12000 milliseconds.
227 228 229 230 231 232 233 234 235 |
# File 'ext/ilios/cluster.c', line 227
static VALUE cluster_request_timeout(VALUE self, VALUE timeout_ms)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_request_timeout(cassandra_cluster->cluster, cluster_value_to_uint(timeout_ms, "request_timeout"));
return self;
}
|
#resolve_timeout(timeout_ms) ⇒ Cassandra::Cluster
Sets the timeout for waiting for DNS name resolution.
Default is 2000 milliseconds.
245 246 247 248 249 250 251 252 253 |
# File 'ext/ilios/cluster.c', line 245
static VALUE cluster_resolve_timeout(VALUE self, VALUE timeout_ms)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_resolve_timeout(cassandra_cluster->cluster, cluster_value_to_uint(timeout_ms, "resolve_timeout"));
return self;
}
|
#serial_consistency(consistency) ⇒ Cassandra::Cluster
Sets the default serial consistency level of the statement.
Default is CONSISTENCY_ANY.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'ext/ilios/cluster.c', line 385
static VALUE cluster_serial_consistency(VALUE self, VALUE consistency)
{
CassandraCluster *cassandra_cluster;
CassConsistency consistency_value = cluster_value_to_consistency(consistency, "serial_consistency");
// Cassandra only accepts SERIAL/LOCAL_SERIAL as a serial consistency
// level (used for lightweight transactions); any other value passes
// the generic range check above but is later rejected by the server
// at query time with an opaque error, so validate it here.
if (consistency_value != CASS_CONSISTENCY_SERIAL && consistency_value != CASS_CONSISTENCY_LOCAL_SERIAL) {
rb_raise(rb_eArgError, "Invalid serial_consistency: %"PRIsVALUE"", consistency);
}
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_serial_consistency(cassandra_cluster->cluster, consistency_value);
return self;
}
|
#tcp_keepalive(enabled, delay_secs) ⇒ Cassandra::Cluster
Enables/Disables TCP keep-alive.
Default is false (disabled).
530 531 532 533 534 535 536 537 538 |
# File 'ext/ilios/cluster.c', line 530
static VALUE cluster_tcp_keepalive(VALUE self, VALUE enabled, VALUE delay_secs)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_tcp_keepalive(cassandra_cluster->cluster, RTEST(enabled) ? cass_true : cass_false, cluster_value_to_uint(delay_secs, "tcp_keepalive delay_secs"));
return self;
}
|
#tcp_nodelay(enabled) ⇒ Cassandra::Cluster
Enables/Disables Nagle's algorithm on the connections.
Default is true (disables Nagle's algorithm).
511 512 513 514 515 516 517 518 519 |
# File 'ext/ilios/cluster.c', line 511
static VALUE cluster_tcp_nodelay(VALUE self, VALUE enabled)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_tcp_nodelay(cassandra_cluster->cluster, RTEST(enabled) ? cass_true : cass_false);
return self;
}
|
#token_aware_routing(enabled) ⇒ Cassandra::Cluster
Configures the cluster to use token-aware request routing or not.
Default is true (enabled).
624 625 626 627 628 629 630 631 632 |
# File 'ext/ilios/cluster.c', line 624
static VALUE cluster_token_aware_routing(VALUE self, VALUE enabled)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_token_aware_routing(cassandra_cluster->cluster, RTEST(enabled) ? cass_true : cass_false);
return self;
}
|
#use_schema(enabled) ⇒ Cassandra::Cluster
Enables/Disables retrieving and updating schema metadata. Disabling this
can be useful to improve startup performance, but it means that
'Session#schema_metadata'-like features will not work.
Default is true (enabled).
660 661 662 663 664 665 666 667 668 |
# File 'ext/ilios/cluster.c', line 660
static VALUE cluster_use_schema(VALUE self, VALUE enabled)
{
CassandraCluster *cassandra_cluster;
GET_CLUSTER(self, cassandra_cluster);
cass_cluster_set_use_schema(cassandra_cluster->cluster, RTEST(enabled) ? cass_true : cass_false);
return self;
}
|