You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ramesh Natarajan <ra...@gmail.com> on 2014/03/11 19:37:27 UTC

Fwd: NetworkTopologyStrategy ring distribution across 2 DC

Hi,

I have 14 cassandra nodes, running as 2 data centers
using PropertyFileSnitch as follows

192.168.1.101=DC1:RAC1
192.168.1.102=DC1:RAC1
192.168.1.103=DC1:RAC1
192.168.1.104=DC1:RAC1
192.168.1.105=DC1:RAC1
192.168.1.106=DC1:RAC1
192.168.1.107=DC1:RAC1
192.168.1.108=DC2:RAC1
192.168.1.109=DC2:RAC1
192.168.1.110=DC2:RAC1
192.168.1.111=DC2:RAC1
192.168.1.112=DC2:RAC1
192.168.1.113=DC2:RAC1
192.168.1.114=DC2:RAC1

My schema uses replication factor of 3 for each data center as follows

create keyspace test
  with placement_strategy = 'NetworkTopologyStrategy'
  and strategy_options = {DC2 : 3, DC1 : 3}
  and durable_writes = true;

When i setup the second DC, the initial token is offset by 1 per
documentation. When i run the ring command I get this note

Note: Ownership information does not include topology; for complete
information, specify a keyspace

Also the owns column is 0% for the second DC.

Is this normal?


thanks
Ramesh


# /opt/mp/storage/persistent/cassandra-dse/bin/nodetool -h cassandra101 ring
Note: Ownership information does not include topology; for complete
information, specify a keyspace

Datacenter: DC1
==========
Address        Rack        Status State   Load            Owns
   Token

  6588122883467697004
192.168.1.101  RAC1        Up     Normal  4.8 MB          14.29%
   -9223372036854775808
192.168.1.102  RAC1        Up     Normal  4.69 MB         14.29%
   -6588122883467697006
192.168.1.103  RAC1        Up     Normal  4.83 MB         14.29%
   -3952873730080618204
192.168.1.104  RAC1        Up     Normal  4.77 MB         14.29%
   -1317624576693539402
192.168.1.105  RAC1        Up     Normal  4.8 MB          14.29%
   1317624576693539400
192.168.1.106  RAC1        Up     Normal  4.73 MB         14.29%
   3952873730080618202
192.168.1.107  RAC1        Up     Normal  4.72 MB         14.29%
   6588122883467697004

Datacenter: DC2
==========
Address        Rack        Status State   Load            Owns
   Token

  6588122883467697005
192.168.1.108  RAC1        Up     Normal  3.22 MB         0.00%
  -9223372036854775807
192.168.1.109  RAC1        Up     Normal  3.16 MB         0.00%
  -6588122883467697005
192.168.1.110  RAC1        Up     Normal  4.79 MB         0.00%
  -3952873730080618203
192.168.1.111  RAC1        Up     Normal  4.73 MB         0.00%
  -1317624576693539401
192.168.1.112  RAC1        Up     Normal  4.76 MB         0.00%
  1317624576693539401
192.168.1.113  RAC1        Up     Normal  3.19 MB         0.00%
  3952873730080618203
192.168.1.114  RAC1        Up     Normal  4.69 MB         0.00%
  6588122883467697005

#

Re: NetworkTopologyStrategy ring distribution across 2 DC

Posted by Ramesh Natarajan <ra...@gmail.com>.
Thanks. The error is gone if i specify the keyspace name. However the
replicas in the ring output is not correct. Shouldn't it say 3 because I
have DC1:3, DC2:3 in my schema?


thanks
Ramesh

Datacenter: DC1
==========
Replicas: 2

Address        Rack        Status State   Load            Owns
   Token

  -9223372036854775808
192.168.1.107  RAC1        Up     Normal  4.72 MB         42.86%
   6588122883467697004
192.168.1.106  RAC1        Up     Normal  4.73 MB         42.86%
   3952873730080618202
192.168.1.105  RAC1        Up     Normal  4.8 MB          42.86%
   1317624576693539400
192.168.1.104  RAC1        Up     Normal  4.77 MB         42.86%
   -1317624576693539402
192.168.1.103  RAC1        Up     Normal  4.83 MB         42.86%
   -3952873730080618204
192.168.1.102  RAC1        Up     Normal  4.69 MB         42.86%
   -6588122883467697006
192.168.1.101  RAC1        Up     Normal  4.8 MB          42.86%
   -9223372036854775808

Datacenter: DC2
==========
Replicas: 2

Address        Rack        Status State   Load            Owns
   Token

  3952873730080618203
192.168.1.111  RAC1        Up     Normal  4.73 MB         42.86%
   -1317624576693539401
192.168.1.110  RAC1        Up     Normal  4.79 MB         42.86%
   -3952873730080618203
192.168.1.109  RAC1        Up     Normal  3.16 MB         42.86%
   -6588122883467697005
192.168.1.108  RAC1        Up     Normal  3.22 MB         42.86%
   -9223372036854775807
192.168.1.114  RAC1        Up     Normal  4.69 MB         42.86%
   6588122883467697005
192.168.1.112  RAC1        Up     Normal  4.76 MB         42.86%
   1317624576693539401
192.168.1.113  RAC1        Up     Normal  3.19 MB         42.86%
   3952873730080618203


On Tue, Mar 11, 2014 at 7:24 PM, Tyler Hobbs <ty...@datastax.com> wrote:

>
> On Tue, Mar 11, 2014 at 1:37 PM, Ramesh Natarajan <ra...@gmail.com>wrote:
>
>>
>> Note: Ownership information does not include topology; for complete
>> information, specify a keyspace
>>
>> Also the owns column is 0% for the second DC.
>>
>> Is this normal?
>>
>
> Yes.
>
> Without a keyspace specified, the Owns column is showing the equivalent of
> SimpleStrategy with replication_factor=1.  If you specify a keyspace, it
> will take the replication strategy and options into account.
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>

Re: NetworkTopologyStrategy ring distribution across 2 DC

Posted by Tyler Hobbs <ty...@datastax.com>.
On Tue, Mar 11, 2014 at 1:37 PM, Ramesh Natarajan <ra...@gmail.com>wrote:

>
> Note: Ownership information does not include topology; for complete
> information, specify a keyspace
>
> Also the owns column is 0% for the second DC.
>
> Is this normal?
>

Yes.

Without a keyspace specified, the Owns column is showing the equivalent of
SimpleStrategy with replication_factor=1.  If you specify a keyspace, it
will take the replication strategy and options into account.


-- 
Tyler Hobbs
DataStax <http://datastax.com/>