gpt4 book ai didi

cassandra - 如何在cassandra1.1.9中创建keyspace

转载 作者:行者123 更新时间:2023-12-03 09:30:39 25 4
gpt4 key购买 nike

我正在尝试在 cassandra1.1.9 中创建 key 空间,我按照“帮助创建 key 空间”告诉我的方式做了同样的事情。

CREATE KEYSPACE testkeyspace with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = [{replication_factor:2}];
EVEN TRIED THIS
create keyspace testkeyspace;
update keyspace testkeyspace with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:3};


I always got this error:
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.cli.CliClient$AddKeyspaceArgument.STRATEGY_OPT:ONS

最佳答案

我使用的是 1.2.8 版,但唯一对我有用的语法是:

create keyspace demo with replication = {'class':'SimpleStrategy', 'replication_factor':1}

关于cassandra - 如何在cassandra1.1.9中创建keyspace,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14643938/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com