incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: Converting separate clusters in mutliple dc to one cluster across multiple dcs
Date Mon, 16 May 2011 10:27:05 GMT
a) No, the tokens and the endpoints are for the entire cluster. You can only have one snitch
per cluster, why do you want multiple ones? 

b) That happens if the endpoint / node is not listed in the topology, add the node to the
topology first. created https://issues.apache.org/jira/browse/CASSANDRA-2656 to have a nicer
message. 


cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 16 May 2011, at 12:41, Anurag Gujral wrote:

> Hi Aaron,
>               Thanks for your mail. I am leaning towards making a new cluster since I
am using cassandra version
> 0.7.3 and the fix you have put in is in cassandra 0.7.5, and I am less adventurous primarily
because it is live system and service disruption is not what is desirable.
> 
> I have two more questions for you:
> 
> a)Is there a way to specify snitch in cassandra per CF rather than one snitch for all
column family.
> 
> b)I have a weird issue with 0.7.3 when using property file snitch and a new node is added
to an existing running
> cassandra cluster(which uses property file snitch) I have to add new node's IP to the
cassandra-topology.properties of all the existing  cassandra nodes otherwise the new node
gives error
> ERROR [main] 2011-05-13 23:41:30,821 AbstractCassandraDaemon.java (line 333) Exception
encountered during startup.
> java.lang.NullPointerException
>     at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:96)
>     at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:87)
>     at org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(AbstractReplicationStrategy.java:196)
>     at org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddressRanges(AbstractReplicationStrategy.java:230)
>     at org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.java:195)
>     at org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:83)
>     at org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:525)
>     at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:453)
>     at org.apache.cassandra.service.StorageService.initServer(StorageService.java:403)
>     at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:194)
>     at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:316)
>     at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79)
> java.lang.NullPointerException
>     at org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFileSnitch.java:96)
>     at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:87)
>     at org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(AbstractReplicationStrategy.java:196)
>     at org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddressRanges(AbstractReplicationStrategy.java:230)
>     at org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.java:195)
>     at org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:83)
>     at org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:525)
>     at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:453)
>     at org.apache.cassandra.service.StorageService.initServer(StorageService.java:403)
>     at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:194)
>     at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:316)
>     at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79)
> 
> Thanks for all your help.
> 
> Anurag
> 
> 
> On Sun, May 15, 2011 at 3:56 PM, aaron morton <aaron@thelastpickle.com> wrote:
> Rename a cluster 
> http://wiki.apache.org/cassandra/FAQ#clustername_mismatch
> see also https://issues.apache.org/jira/browse/CASSANDRA-2632
> 
> The best approach will depend on 
> - how much data you have
> - if this is a running system 
> - are the schemas identical 
> - are the individual clusters using the NetworkTopologyStrategy ? 
> - how much excitement you like.  
> 
> Initial thoughts, doubt this is correct...
> 
> - change the tokens in each dc 
> - for a dc that will have the others join it, change cassandra-topology.properties to
put the new nodes in the new dc
> - for a dc joining another, follow the procedure to change the name on each node, update
the seed list and update the topology to include the dc it is joining, remove the schema and
migrations SStables, as you do a rolling restart
> - update the seed list on the dc the others joined
> - confirm there is one schema def
> - update the replication factor of the schema to put replicas in each DC  http://wiki.apache.org/cassandra/Operations#Replication
> - nodetool repair to change the RF and then cleanup 
> 
> There will be a lot of data moves and I doubt I got it right, is there any chance of
spinning up a whole new cluster and reloading the data ?
> 
> I can give it some more thought later if you need. 
> 
> Hope that helps. 
> 
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
> 
> On 14 May 2011, at 04:55, Anurag Gujral wrote:
> 
>> Hi All,
>>             I  have 3 separate cassandra clusters running in multiple data centers
which I want to convert to  one cassandra cluster across multiple data centers
>> Does anyone tried this? If so what are the steps:
>> 
>> I think I need to do the following:
>> a)Change cluster name: What is the procedure to do this?
>> b)Change tokens so that each node have a unique token
>> c)Change seed nodes so that machines in one data center know about machines in another
data center.
>> 
>> Thanks
>> Anurag
>> 
>> 
>> 
> 
> 


Mime
View raw message