Cassandra教程
基本语法:
CREATE KEYSPACE [ IF NOT EXISTS ] keyspace_name WITH options
例如:
CREATE KEYSPACE myKeyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3}; CREATE KEYSPACE myKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1' : 1, 'DC2' : 3} AND durable_writes = false;
参数说明:
参数 |
类型 |
是否必需 |
默认值 |
描述 |
replication |
map |
yes |
|
keyspace的复制策略和选项 |
durable_writes |
simple |
no |
true |
该keyspace的更新操作是否使用commit log |