Cassandra IllegalArgumentException creating keyspace
cassandra, java
Solution
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)
Problem
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?