About keyspaces
Top level database object that contains tables, materialized views, user-defined types, functions, and aggregates and controls the data replication factor.
cassandra-rackdc.properties
The location of the cassandra-rackdc.properties file depends on the type of installation:Package installations | /etc/dse/cassandra/cassandra-rackdc.properties |
Tarball installations | installation_location/resources/cassandra/conf/cassandra-rackdc.properties |
A keyspace is the top level database object that controls the replication for the object it contains at each datacenter in the cluster. Keyspaces contain tables, materialized views and user-defined types, functions, and aggregates. Typically, a cluster has one keyspace per application. Because replication is controlled on a per-keyspace basis, store data with different replication requirements (at the same datacenter) in different keyspaces. Keyspaces are not a significant map layer within the data model.
Replication strategy and factor
When you create or modify a keyspace, specify a Replication strategy class and factor settings for replicating keyspaces:
SimpleStrategy
class is intended for evaluating DataStax Enterprise. For production use or for use with mixed workloads, use theNetworkTopologyStrategy
class.-
NetworkTopologyStrategy
class is for production use.Note: You can also useNetworkTopologyStrategy
for evaluation purposes by changing the default snitch, SimpleSnitch, to a network-aware snitch. Choose a snitch and define one or more datacenter names in the snitch properties file, and then use the datacenter name(s) to set the keyspace replication factor. For example, if the cluster uses the GossipingPropertyFileSnitch, create the keyspace using the user-defined datacenter and rack names in the cassandra-rackdc.properties file. If the cluster uses the Configuring the Amazon EC2 single-region snitch, create the keyspace using EC2 datacenter and rack names. If the cluster uses the Configuring the Google Cloud Platform snitch, create the keyspace using GoogleCloud datacenter and rack names. EveryWhereStrategy
is a specialized DataStax Enterprise strategy used by thedse_system
keyspace and is not intended for customer use.
Showing the keyspace details
In cqlsh, the DESCRIBE KEYSPACE command outputs the full details of the keyspace, including all database objects the keyspace contains. Use the output from the DESCRIBE command to recreate the keyspace and all its components.
Errors related to the SimpleSnitch
NetworkTopologyStrategy
, a
write request such as inserting data into a table might fail with the following error message:
Unable to complete request: one or more nodes were unavailable.