Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED9D16E10 for ; Mon, 16 May 2011 10:27:38 +0000 (UTC) Received: (qmail 26873 invoked by uid 500); 16 May 2011 10:27:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 26848 invoked by uid 500); 16 May 2011 10:27:36 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 26840 invoked by uid 99); 16 May 2011 10:27:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 10:27:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a78.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 May 2011 10:27:30 +0000 Received: from homiemail-a78.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a78.g.dreamhost.com (Postfix) with ESMTP id 672CF15C062 for ; Mon, 16 May 2011 03:27:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=mno/8kTwET wohVvC+ruJpLI3bJ1STafAqwZOYMHX3ZTQX4HAooLoSmLpOnUMGht5uzJlsA3U+8 rhd/EQoRrIHJpxPnjAZyvkMYrdsmZuxvE45BfL0Y+QQMQw26JN0w8k91QFzM4xJb y/sLl7XECU869SB3BFDcrx9z9mp9Ct/I8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=bYj+NSkG38h96zAp xna6IjH0170=; b=pHRUVrN2hXbiDSHptpM5gWQwX7R4nNI644Uj7RUXAWICGLEp n0QxIp/Wv9FutBD7bCCgE15wwIUXKtOxr6VxHc0n9ZG2Qk8O+BYifXBc7NsH+hZX 2wcxtiRLPYMIBBf6AMTLLL+7NiJOiWLTfnfq3sQC8sbiTKWeHvMlOla4j24= Received: from [10.0.1.151] (121-73-157-230.cable.telstraclear.net [121.73.157.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a78.g.dreamhost.com (Postfix) with ESMTPSA id 49B6215C059 for ; Mon, 16 May 2011 03:27:08 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-6-816911506 Subject: Re: Converting separate clusters in mutliple dc to one cluster across multiple dcs Date: Mon, 16 May 2011 22:27:05 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: X-Mailer: Apple Mail (2.1084) --Apple-Mail-6-816911506 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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?=20 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.=20 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. >=20 > I have two more questions for you: >=20 > a)Is there a way to specify snitch in cassandra per CF rather than one = snitch for all column family. >=20 > 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(PropertyFile= Snitch.java:96) > at = org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpo= ints(NetworkTopologyStrategy.java:87) > at = org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(= AbstractReplicationStrategy.java:196) > at = org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddress= Ranges(AbstractReplicationStrategy.java:230) > at = org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.ja= va: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.j= ava:453) > at = org.apache.cassandra.service.StorageService.initServer(StorageService.java= :403) > at = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:194) > at = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.java:316) > at = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79) > java.lang.NullPointerException > at = org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFile= Snitch.java:96) > at = org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpo= ints(NetworkTopologyStrategy.java:87) > at = org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(= AbstractReplicationStrategy.java:196) > at = org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddress= Ranges(AbstractReplicationStrategy.java:230) > at = org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.ja= va: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.j= ava:453) > at = org.apache.cassandra.service.StorageService.initServer(StorageService.java= :403) > at = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:194) > at = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.java:316) > at = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79) >=20 > Thanks for all your help. >=20 > Anurag >=20 >=20 > On Sun, May 15, 2011 at 3:56 PM, aaron morton = wrote: > Rename a cluster=20 > http://wiki.apache.org/cassandra/FAQ#clustername_mismatch > see also https://issues.apache.org/jira/browse/CASSANDRA-2632 >=20 > The best approach will depend on=20 > - how much data you have > - if this is a running system=20 > - are the schemas identical=20 > - are the individual clusters using the NetworkTopologyStrategy ?=20 > - how much excitement you like. =20 >=20 > Initial thoughts, doubt this is correct... >=20 > - change the tokens in each dc=20 > - 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=20 >=20 > 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 ? >=20 > I can give it some more thought later if you need.=20 >=20 > Hope that helps.=20 >=20 > ----------------- > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpickle.com >=20 > On 14 May 2011, at 04:55, Anurag Gujral wrote: >=20 >> 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: >>=20 >> 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. >>=20 >> Thanks >> Anurag >>=20 >>=20 >>=20 >=20 >=20 --Apple-Mail-6-816911506 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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://issu= es.apache.org/jira/browse/CASSANDRA-2656 to have a nicer = message. 


cheers
http://www.thelastpickle.com

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

Hi = Aaron,
          &nbs= p;   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(PropertyFile= Snitch.java:96)
    at = org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpo= ints(NetworkTopologyStrategy.java:87)
    at = org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(= AbstractReplicationStrategy.java:196)
    at = org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddress= Ranges(AbstractReplicationStrategy.java:230)
    at = org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.ja= va:195)
    at = org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:83)
&= nbsp;   at = org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:= 525)
    at = org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.j= ava:453)
    at = org.apache.cassandra.service.StorageService.initServer(StorageService.java= :403)
    at = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:194)
    at = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.java:316)
    at = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79)<= br>java.lang.NullPointerException
    at = org.apache.cassandra.locator.PropertyFileSnitch.getDatacenter(PropertyFile= Snitch.java:96)
    at = org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpo= ints(NetworkTopologyStrategy.java:87)
    at = org.apache.cassandra.locator.AbstractReplicationStrategy.getAddressRanges(= AbstractReplicationStrategy.java:196)
    at = org.apache.cassandra.locator.AbstractReplicationStrategy.getPendingAddress= Ranges(AbstractReplicationStrategy.java:230)
    at = org.apache.cassandra.dht.BootStrapper.getRangesWithSources(BootStrapper.ja= va:195)
    at = org.apache.cassandra.dht.BootStrapper.bootstrap(BootStrapper.java:83)
&= nbsp;   at = org.apache.cassandra.service.StorageService.bootstrap(StorageService.java:= 525)
    at = org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.j= ava:453)
    at = org.apache.cassandra.service.StorageService.initServer(StorageService.java= :403)
    at = org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassand= raDaemon.java:194)
    at = org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCass= andraDaemon.java:316)
    at = org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:79)<= br>
Thanks for all your help.

Anurag


On Sun, May 15, 2011 at = 3:56 PM, aaron morton <aaron@thelastpickle.com> wrote:
Rename a cluster 

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<= /a>
- 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. 


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






= --Apple-Mail-6-816911506--