sharedCqlCluster = configuration.cql().metricRegistry(_metricRegistry).cluster(); _lifeCycle.manage(sharedAstyanaxCluster); _lifeCycle.manage(sharedCqlCluster); .keyspace(keyspaceName) .metricRegistry(_metricRegistry) .cluster();
sharedCqlCluster = configuration.cql().metricRegistry(_metricRegistry).cluster(); _lifeCycle.manage(sharedAstyanaxCluster); _lifeCycle.manage(sharedCqlCluster); .keyspace(keyspaceName) .metricRegistry(_metricRegistry) .cluster();
public HintsPollerCQLSession cqlSessionForHintsPoller(CassandraConfiguration configuration) { // Nodes can register themselves in ZooKeeper to help figure out which hosts are in this data center. configuration.withZooKeeperHostDiscovery(_curator); // Hints Poller only need 1 connection per host since all this is used for is single-threaded polling of the hints table. // We could also have a new property in the CassandraConfiguration yaml's just for the HintsPoller sake. CqlCluster cqlCluster = configuration.cql() .metricRegistry(_metricRegistry) .disableClusterMetrics() .maxConnectionsPerHost(1) .coreConnectionsPerHost(1) .loadBalancingPolicy(new SelectedHostLoadBalancingPolicy()) .retryPolicy(FallthroughRetryPolicy.INSTANCE) .cluster(); _lifeCycle.manage(cqlCluster); return new HintsPollerCQLSession(_lifeCycle, cqlCluster); }
public Cql cql() { return new Cql(); }
public HintsPollerCQLSession cqlSessionForHintsPoller(CassandraConfiguration configuration) { // Nodes can register themselves in ZooKeeper to help figure out which hosts are in this data center. configuration.withZooKeeperHostDiscovery(_curator); // Hints Poller only need 1 connection per host since all this is used for is single-threaded polling of the hints table. // We could also have a new property in the CassandraConfiguration yaml's just for the HintsPoller sake. CqlCluster cqlCluster = configuration.cql() .metricRegistry(_metricRegistry) .disableClusterMetrics() .maxConnectionsPerHost(1) .coreConnectionsPerHost(1) .loadBalancingPolicy(new SelectedHostLoadBalancingPolicy()) .retryPolicy(FallthroughRetryPolicy.INSTANCE) .cluster(); _lifeCycle.manage(cqlCluster); return new HintsPollerCQLSession(_lifeCycle, cqlCluster); }
public Cql cql() { return new Cql(); }