As per Jonathans previous comments, the CLI defaults to using the
NetworkTopologyStrategy which requires different strategy_options. See the CLI
help under help create keyspace;
When using the strategy_options clause you need to specify the options the
strategy is expecting. From the examples in the help
Examples:
create keyspace Keyspace2
with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
and strategy_options = [{replication_factor:4}];
create keyspace Keyspace3
with placement_strategy =
'org.apache.cassandra.locator.NetworkTopologyStrategy'
and strategy_options=[{DC1:2, DC2:2}];
create keyspace Keyspace4
with placement_strategy =
'org.apache.cassandra.locator.OldNetworkTopologyStrategy'
and strategy_options = [{replication_factor:1}];
When https://issues.apache.org/jira/browse/CASSANDRA-2960 is released will be
getting an error.
Cheers
-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com
On 9 Aug 2011, at 08:17, Bret Palsson wrote:
> Sorry about that sent the last email a little prematurely.
> ------
>
> Does anyone have a solution or have seen this type of behavior?
>
> Running: apache-cassandra08-0.8.2
>
> Attempting to use QUORUM reads and writes only works on a keyspace with =
> RF =3D 1. With RF set to 2 or 3, the write fails and reads return =
> unavailable.
>
> These CLI commands will reproduce the issue:
>
> create keyspace rftest with strategy_options=3D[{replication_factor:2}];
> use rftest;
> create column family TestData with comparator =3D UTF8Type;
> set TestData[utf8('foo')]['bar'] =3D 'bad';
>
>
> Here is my ring:
> Address DC Rack Status State Load =
> Owns Token
> =
> 127605887595351923798765477786913079296
> 10.200.99.5 datacenter1 rack1 Up Normal 379.48 KB =
> 25.00% 0
> 10.200.99.6 datacenter1 rack1 Up Normal 387.3 KB =
> 25.00% 42535295865117307932921825928971026432
> 10.200.99.13 datacenter1 rack1 Up Normal 369.41 KB =
> 25.00% 85070591730234615865843651857942052864
> 10.200.99.14 datacenter1 rack1 Up Normal 378.17 KB =
> 25.00% 127605887595351923798765477786913079296
>
>
> cassandra-cli:
> # cassandra-cli -h cassandra1
> Connected to: "Jive Core" on cassandra1/9160
> Welcome to the Cassandra CLI.
>
> Type 'help;' or '?' for help.
> Type 'quit;' or 'exit;' to quit.
>
> [default@unknown] use rftest;
> Authenticated to keyspace: rftest
> [default@rftest] set TestData[utf8('foo')]['bar'] =3D 'baz';
> null
> [default@rftest]=20
>
> Debug output:
> Aug 8 14:13:57 DEBUG 14:13:57,691 insert=