I am using Cassandra 1.2, on Mac OS X Lion.
I have dropped into ./bin/cassandra-cli and am attempting to create a keyspace using the following syntax:
CREATE KEYSPACE my_keyspace WITH REPLICATION = { 'class': 'SimpleStrategy', 'replication_factor': 1 };
This command is copied almost entirely from the documentation for Cassandra 1.2 here, but I am getting a Java error:
java.lang.IllegalArgumentException: No enum const class org.apache.cassandra.cli.CliClient$AddKeyspaceArgument.REPLICATION
Does anyone know the root cause of this error and how I could go about fixing it?
If you are using cassandra-cli this is the correct syntax:
CREATE KEYSPACE my_keyspace
with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
and strategy_options = {replication_factor:1};
(syntax you tried with is for cqlsh)
That's the create keyspace
command for CQL3 with bin/cqlsh -3
Schildmeijer's answer is for CLI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With