Thanks Evneniy,
We encountered this exception with the following settings:
<bean id=*"consistencyLevelPolicy"* class=*
"me.prettyprint.cassandra.model.ConfigurableConsistencyLevel"*>
<property name=*"defaultReadConsistencyLevel"* value=*"LOCAL_QUORUM"*
/>
<property name=*"defaultWriteConsistencyLevel"* value=*"LOCAL_QUORUM"*
/>
</bean>
Caused by: InvalidRequestException(why:consistency level LOCAL_QUORUM not
compatible with replication strategy (org.apache.cassandra.locator
.SimpleStrategy))
at
org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:19045)
at
org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:1035)
at
org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:1009)
at
me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:95)
at
me.prettyprint.cassandra.service.KeyspaceServiceImpl$1.execute(KeyspaceServiceImpl.java:90)
at
me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101)
at
me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:232)
at
me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:131)
at
me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:102)
at
me.prettyprint.cassandra.service.KeyspaceServiceImpl.batchMutate(KeyspaceServiceImpl.java:108)
at
me.prettyprint.cassandra.model.MutatorImpl$3.doInKeyspace(MutatorImpl.java:222)
at
me.prettyprint.cassandra.model.MutatorImpl$3.doInKeyspace(MutatorImpl.java:219)
at
me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
at
me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:85)
at
me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:219)
Which is why I raised this email originally. It is probable that we have not
configured the system correctly, I just need to find out what it is I'm
missing.
Anthony
On Wed, Aug 31, 2011 at 2:59 PM, Evgeniy Ryabitskiy <
[email protected]> wrote:
> Hi
> Actually you can use LOCAL_QUORUM and EACH_QUORUM policy everywhere on
> DEV/QA/Prod.
> Even it would be better for integration tests to use same Consistency level
> as on production.
>
> For production with multiple DC you usually need to chouse between 2 common
> solutions: Geographical Distribution or Disaster Recovery.
> See: http://www.datastax.com/docs/0.8/operations/datacenter
>
> LOCAL_QUORUM and EACH_QUORUM for DEV/QA/Prod by examples:
>
> create keyspace KeyspaceDEV
> with placement_strategy =
> 'org.apache.cassandra.locator.NetworkTopologyStrategy'
> and strategy_options=[{*datacenter1*:1}];
>
> create keyspace KeyspaceQA
> with placement_strategy =
> 'org.apache.cassandra.locator.NetworkTopologyStrategy'
> and strategy_options=[{*datacenter1*:2}];
>
> create keyspace KeyspaceProd
> with placement_strategy =
> 'org.apache.cassandra.locator.NetworkTopologyStrategy'
> and strategy_options=[{*datacenter1*:3, datacenter2:3}];
>
>
> Be careful(!!!), usually default name of DC in new cluster is *datacenter1
> *. But cassandra-cli use default name *DC1*. (some small mismatch/bug
> maybe).
>
> Evgeny.
>