@Override public String apply(CassandraKeyspace keyspace) { return keyspace.getClusterName(); } })));
/** * Downgrades the specified consistency level to be compatible with the Cassandra ring's actual topology. * Useful for writing code that runs against rings that vary between single-node testing servers and multi- * data center, highly replicated network topologies. */ public ConsistencyLevel clamp(ConsistencyLevel consistencyLevel) { return _topologyAdapter.clamp(consistencyLevel); }
@Override public void start() throws Exception { // Not using the RandomPartitioner could lead to hotspots in the Cassandra ring. _keyspace.warnIfPartitionerMismatch(RandomPartitioner.class); }
public void start() throws Exception { // Astyanax _astyanaxKeyspace = _astyanaxCluster.connect(_keyspaceName); _replication = new CassandraReplication(_astyanaxKeyspace.describeKeyspace()); _topologyAdapter = new ConsistencyTopologyAdapter(_replication); // CQL driver _cqlSession = _cqlCluster.connect(_keyspaceName); errorIfPartitionerMisconfigured(); }
public ConsistencyTopologyAdapter(CassandraReplication replication) { _networkTopology = replication.isNetworkTopology(); _replicationFactor = replication.getReplicationFactor(); }
public void start() throws Exception { _cqlSession = _cluster.connect(SYSTEM_KEYSPACE); }
public Astyanax astyanax() { return new Astyanax(); }
public String getClusterName() { return _cqlCluster.getClusterName(); }
public String getDataCenter() { return _cqlCluster.getDataCenter(); }
public Cql cql() { return new Cql(); }
public void start() throws Exception { // Astyanax _astyanaxKeyspace = _astyanaxCluster.connect(_keyspaceName); _replication = new CassandraReplication(_astyanaxKeyspace.describeKeyspace()); _topologyAdapter = new ConsistencyTopologyAdapter(_replication); // CQL driver _cqlSession = _cqlCluster.connect(_keyspaceName); errorIfPartitionerMisconfigured(); }
@Override public String apply(CassandraKeyspace keyspace) { return keyspace.getClusterName(); } })));
public ConsistencyTopologyAdapter(CassandraReplication replication) { _networkTopology = replication.isNetworkTopology(); _replicationFactor = replication.getReplicationFactor(); }
/** * Downgrades the specified consistency level to be compatible with the Cassandra ring's actual topology. * Useful for writing code that runs against rings that vary between single-node testing servers and multi- * data center, highly replicated network topologies. */ public ConsistencyLevel clamp(ConsistencyLevel consistencyLevel) { return _topologyAdapter.clamp(consistencyLevel); }
@Override public void start() throws Exception { // Not using the RandomPartitioner could lead to hotspots in the Cassandra ring. _keyspace.warnIfPartitionerMismatch(RandomPartitioner.class); }
public void start() throws Exception { _cqlSession = _cluster.connect(SYSTEM_KEYSPACE); }
public Astyanax astyanax() { return new Astyanax(); }
public String getClusterName() { return _cqlCluster.getClusterName(); }
public String getDataCenter() { return _cqlCluster.getDataCenter(); }
public Cql cql() { return new Cql(); }