首页 文章

无法在Cassandra中更新复制因子

提问于
浏览
4

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

[默认@Keyspace1]描述Keyspace1;
Keyspace:Keyspace1:
复制策略:org.apache.cassandra.locator.NetworkTopologyStrategy
持久的写作:真实
选项:[datacenter1:1]

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

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

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

`

1 回答

  • 5

    您缺少围绕战略选项的 [ ] . 您的更新代码应为:

    UPDATE KEYSPACE Keyspace1 WITH strategy_options = [{datacenter1:3}];
    

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

相关问题