Hello,

>on my local machine, Cassandra is annoyingly insisting on 'datacenter1'.

I don't believe Cassandra does it on its own )))



What is parameter endpoint_snitch in cassandra.yaml file? As it was mentioned, 
different snitches use different configuration files and you can set the same 
data center name in both your testing and production environments.



>I would be careful changing datacenter name, particularly in 
production...it may result in stale data depending on token values 

Actually tokens shouldn't change if number of nodes remains the same.

You can change DC name on all nodes (-Dcassandra.ignore_dc=true must be set on 
first run) and run nodetool repair/cleanup on each node to ensure data 
consistency.





>And unless I define my replication as: '{'class': 
'NetworkTopologyStrategy', 'datacenter1' : 3}' when creating my keyspace, my 
inserts / selects don't work because it says 0 replicas available

Probably you can also use SimpleStrategy (depending on system configuration and 
needs)





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.






---- On Mon, 10 Oct 2016 16:30:49 -0400Ali Akhtar <ali.rac...@gmail.com> 
wrote ----




Yeah, so what's happening is, I'm running Cassandra thru a docker image in 
production, and so over there, it is using the datacenter name that I specified 
thru an env variable.



But on my local machine, Cassandra is annoyingly insisting on 'datacenter1'.



So in order to maintain the same .cql scripts for setting up the db, I either 
need to change the dc name locally or in production.



I guess it looks like I should leave it 'datacenter1' in production.




On Tue, Oct 11, 2016 at 1:19 AM, Amit Trivedi <tria...@gmail.com> wrote:






I believe it is coming from system.local. You can verify by executing


select data_center from system.local;

I would be careful changing datacenter name, particularly in production.  This 
is essentially because if change of datacenter requires snitch configuration 
change, it may result in stale data depending on token values and snitch 
settings and there is a risk of node reporting invalid/ missing data to client.






On Mon, Oct 10, 2016 at 4:08 PM, Ali Akhtar <ali.rac...@gmail.com> wrote:

So I see this:



cluster_name: 'Test Cluster'



But when I grep -i or ctrl + f for 'datacenter1` in cassandra.yaml, I don't see 
that anywhere except in a comment.





Yet when I do nodetool status, I see: datacenter1



And unless I define my replication as: '{'class': 'NetworkTopologyStrategy', 
'datacenter1' : 3}' when creating my keyspace, my inserts / selects don't work 
because it says 0 replicas available (i.e if i use anything other than 
'datacenter1' in the above stmt)



I don't see 'datacenter1' in rackdc.properties. So my question is, which file 
contains 'datacenter1'?




On Tue, Oct 11, 2016 at 12:54 AM, Adam Hutson <a...@datascale.io> wrote:

There is a cluster name in the cassandra.yaml for naming the cluster, aka data 
center. Then you assign keyspaces to the data center within the CREATE KEYSPACE 
stmt with NetworkTopology. 





On Monday, October 10, 2016, Ali Akhtar <ali.rac...@gmail.com> wrote:

Where can I change the default name 'datacenter1'? I've looked through the 
configuration files in /etc/cassandra , and can't find where this value is 
being defined.





-- 

Adam Hutson
Data Architect | DataScale
+1 (417) 224-5212
a...@datascale.io












Reply via email to