cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A J <s5a...@gmail.com>
Subject Re: Network Topology Strategy error
Date Thu, 03 Mar 2011 22:09:05 GMT
Thanks.
It worked when I changed as you suggested to: create keyspace ks1 with
strategy_options = [{DC1:1, DC2:1}] and
placement_strategy='org.apache.cassandra.locator.NetworkTopologyStrategy';

Something that I am observing:
The replicas are always put in the first node on the other DC. (So if
there are 2 nodes in each DC, replica of both nodes goes to the first
node in the other DC. And vice-versa)
This would make the first node in each DC a hotspot. Am I doing
something wrong ? If not, any way to avoid this ?



On Thu, Mar 3, 2011 at 3:41 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
> you need to specify per-DC replicas w/ NTS in strategy_options,
> instead of using replication_factor
>
> On Thu, Mar 3, 2011 at 1:52 PM, A J <s5alye@gmail.com> wrote:
>> using latest cassandra (0.7.2). I want to try out Network Topology Strategy.
>>
>> Following is related setting in cassandra.yaml
>> endpoint_snitch: org.apache.cassandra.locator.PropertyFileSnitch
>>
>> I have four nodes. Set them accordingly in ./conf/cassandra-topology.properties:
>> 10.252.219.224=DC2:RAC1
>> 10.252.10.64=DC2:RAC1
>> 10.252.11.32=DC1:RAC1
>> 10.220.103.98=DC1:RAC1
>>
>>
>> I create a ks as:
>> create keyspace ks1 with replication_factor=1 and
>> placement_strategy='org.apache.cassandra.locator.NetworkTopologyStrategy';
>>
>> When I try to insert, get the following error:
>> set cf1['A']['c1']='xyz';
>> ERROR 19:21:58,081 Internal error processing insert
>> java.lang.AssertionError: invalid response count 1 for replication factor 0
>>
>>
>> Please suggest what could be going on ? cassandra-topology.properties
>> has two DCs. Why am I still getting the error ?
>>
>> Thanks for any suggestions.
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Mime
View raw message