incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From java jalwa <java.ka.ja...@gmail.com>
Subject Confusion regarding the terms "replica" and "replication factor"
Date Wed, 23 May 2012 03:16:01 GMT
Hi all,
              I am a bit confused regarding the terms "replica" and
"replication factor". Assume that I am using RandomPartitioner and
NetworkTopologyStrategy for replica placement.
>From what I understand, with a RandomPartitioner, a row key will
always be hashed and be stored on the node that owns the range to
which the key is mapped.
http://www.datastax.com/docs/1.0/cluster_architecture/replication#networktopologystrategy.
The example here, talks about having 2 data centers and a replication
factor of 4 with 2 replicas in each datacenter, so the strategy is
configured as DC1:2 and DC2:2. Now suppose I add another datacenter
DC3, and do not change the NetworkTopologyStrategy.
Now if a row key hash is mapped to a range owned by a node in DC3,
will the Node in DC3 still store the key as determined by the
partitioner and then walk the ring and store 2 replicas each in DC1
and DC2 ? Will that mean that I will then have 5 replicas in the
cluster and not 4 ? Or will the co-ordinator node be aware of the
replica placement strategy,
and override the partitioner's decision and walk the ring until it
first encounters a node in DC1 or DC2 ? and then place the remaining
replicas ?

Thanks.

Mime
View raw message