我已经安装了"Apache Cassandra 3.9.0的DataStax发行版"。 打开 cassandra CQL shell 后,我运行了以下命令
Create keyspace KeyspaceName
with replicaton{'class':'simplestrategy','replication_factor': 1}
但是我收到一个错误:
Unable to find replication strategy class 'org.apache.cassandra.locator.simplestrategy'
复制策略类名在 CQL 中区分大小写,复制因子为 1 的 SimpleStrategy 的正确语法为:
CREATE KEYSPACE my_keyspace
WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}
Cassandra 区分大小写,所以你应该使用 SimpleStrategy 而不是 simplestrategy,并且中间没有空格。