无法在Cassandra中更新复制因子

flo*_*pot 4 cluster-computing cassandra

我正在运行一个带有3个节点的cassandra集群.keyspace1配置为运行NetworkTopologyStrategy,

[default@Keyspace1] describe Keyspace1;
   Keyspace: Keyspace1:
   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
   Durable Writes: true
   Options: [datacenter1:1]
Run Code Online (Sandbox Code Playgroud)

我尝试通过在cassandra CLI中的Node1上运行此命令来更新复制因子

使用strategy_options = {datacenter1:3}更新密钥空间Keyspace1;

但是当我使用describe Keyspace1再次检查时,我仍然看到选项:[datacenter1:1],复制因子没有改变.我尝试重启cassandra,尝试修复和清理所有节点,仍然没有效果.我错过了什么?

`

Lyu*_*rov 5

你错过了[ ]围绕策略选项的包装.您的更新代码应为:

UPDATE KEYSPACE Keyspace1 WITH strategy_options = [{datacenter1:3}];
Run Code Online (Sandbox Code Playgroud)

如果您需要有关如何通过CLI更新KS复制因子的更多详细信息,我建议您查看Datastax文档.