Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 8368 invoked from network); 21 Apr 2010 16:32:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 16:32:42 -0000 Received: (qmail 40296 invoked by uid 500); 21 Apr 2010 16:32:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 40223 invoked by uid 500); 21 Apr 2010 16:32:41 -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 40212 invoked by uid 99); 21 Apr 2010 16:32:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 16:32:41 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [131.215.239.119] (HELO mail.alumni.caltech.edu) (131.215.239.119) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 16:32:34 +0000 Received: from localhost (dsl081-082-089.lax1.dsl.speakeasy.net [64.81.82.89]) by mail.alumni.caltech.edu (Postfix) with ESMTPSA id 9B7153F0E10; Wed, 21 Apr 2010 09:31:58 -0700 (PDT) X-DKIM: Sendmail DKIM Filter v2.8.2 mail.alumni.caltech.edu 9B7153F0E10 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alumni.caltech.edu; s=enforce; t=1271867519; bh=yKkTrnMojNTSY/Y//gVQRFljeYYph2yt2UlRjns359w=; h=Date:From:To:Subject:Message-ID:References:Mime-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=N3F7F8GQ4U+VF0KvY1+/uK5//FOaojQV0KG/P+XDZkrps//YuCT3r2rbO3gSJht5T vRZtwlyOiZKfMixdEDztWF0EIVPoZ6MAqVXz7O8ux4JKu+66+n06pWFhwMctJ7vSvt 8O/b1xNuHnV8WwM7cJiCPbUPMEZ6q6vG81ceR//0= Date: Wed, 21 Apr 2010 09:31:56 -0700 From: Anthony Molinaro To: user@cassandra.apache.org Subject: Re: Clarification on Ring operations in Cassandra 0.5.1 Message-ID: <20100421163156.GB39306@alumni.caltech.edu> Mail-Followup-To: user@cassandra.apache.org References: <20100415231044.GA8977@alumni.caltech.edu> <20100419234823.GC30486@alumni.caltech.edu> <20100421160244.GA39306@alumni.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-MailScanner-Information-Alumni: X-Alumni-MailScanner-ID: 9B7153F0E10.ACF7F X-MailScanner-Alumni: No Virii found X-Spam-Status-Alumni: not spam, SpamAssassin (not cached, score=-3.268, required 5, ALL_TRUSTED -1.80, BAYES_00 -2.60, DNS_FROM_OPENWHOIS 1.13, FH_DATE_PAST_20XX 0.00) X-MailScanner-From: anthonym@alumni.caltech.edu X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Apr 21, 2010 at 11:08:19AM -0500, Jonathan Ellis wrote: > Yes, that looks right, where "token really close" means "slightly less > than" (more than would move it into a different node's range). Is it better to go slightly less than (say Token - 1), or slightly more than the beginning of the range (PreviousTokenInRing + 1). I was assuming the latter in my earlier email, but you seem to be suggesting the former? > You can't really migrate via scp since only one node with a given > token can exist in the cluster at a time. Right, I was mostly wondering if I could speed things up by scping the sstables while the system was running (since they shouldn't be changing). Then in quick succession removetoken and bootstrap with the old token. Probably grasping at straws here :b Thanks for the answers, -Anthony > On Wed, Apr 21, 2010 at 11:02 AM, Anthony Molinaro > wrote: > > Hi, > > > > �I'm still curious if I got the data movement right in this email from > > before? �Anyone? �Also, anyone know if I can scp the data directory from > > a node I want to replace to a new machine? �The cassandra streaming seems > > much slower than scp. > > > > -Anthony > > > > On Mon, Apr 19, 2010 at 04:48:23PM -0700, Anthony Molinaro wrote: > >> > >> On Mon, Apr 19, 2010 at 03:28:26PM -0500, Jonathan Ellis wrote: > >> > > Can I then 'nodeprobe move ', and > >> > > achieve the same as step 2 above? > >> > > >> > You can't have two nodes with the same token in the ring at once. �So, > >> > you can removetoken the old node first, then bootstrap the new one > >> > (just specify InitialToken in the config to avoid having it guess > >> > one), or you can make it a 3 step process (bootstrap, remove, move) to > >> > avoid transferring so much data around. > >> > >> So I'm still a little fuzzy for your 3 step case on why less data moves, > >> but let me run through the two scenarios and see where we get. �Please > >> correct me if I'm wrong on some point. > >> > >> Let say I have 3 nodes with random partitioner and rack unaware strategy. > >> Which means I have something like > >> > >> Node �Size � Token �KeyRange (self + next in ring) > >> ---- �---- � ----- �------------------------------ > >> A � � 5 G � � �33 � �1 -> 66 > >> B � � 6 G � � �66 � � � 34 -> 0 > >> C � � 2 G � � � 0 � � � � �67 -> 33 > >> > >> Now lets say Node B is giving us some problems, so we want to replace it > >> with another node D. > >> > >> We've outlined 2 processes. > >> > >> In the first process you recommend > >> > >> 1. removetoken on node B > >> 2. wait for data to move > >> 3. add InitialToken of 66 and AutoBootstrap = true to node D storage-conf.xml > >> � �then start it > >> 4. wait for data to move > >> > >> So when you do the removetoken, this will cause the following transfers > >> at stage 2 > >> � Node A sends 34->66 to Node C > >> � Node C sends 67->0 �to Node A > >> at stage 4 > >> � Node A sends 34->66 to Node D > >> � Node C sends 67->0 �to Node D > >> > >> In the second process I assume you pick a token really close to another token? > >> > >> 1. add InitialToken of 34 and AutoBootstrap to true to node D storage-conf.xml > >> � �then start it > >> 2. wait for data to move > >> 3. removetoken on node B > >> 4. wait for data to move > >> 5. movetoken on node D to 66 > >> 6. wait for data to move > >> > >> This results in the following moves > >> at stage 2 > >> � Node A/B sends 33->34 to Node D (primary token range) > >> � Node B sends 34->66 to Node D � (replica range) > >> at stage 4 > >> � Node C sends 66->0 to Node D (replica range) > >> at stage 6 > >> � No data movement as D already had 33->0 > >> > >> So seems like you move all the data twice for process 1 and only a small > >> portion twice for process 2 (which is what you said, so hopefully I've > >> outlined correctly what is happening). �Does all that sound right? > >> > >> Once I've run bootstrap with the InitialToken value set in the config is > >> it then ignored in subsequent restarts, and if so can I just remove it > >> after that first time? > >> > >> Thanks, > >> > >> -Anthony > >> > >> -- > >> ------------------------------------------------------------------------ > >> Anthony Molinaro � � � � � � � � � � � � � > > > > -- > > ------------------------------------------------------------------------ > > Anthony Molinaro � � � � � � � � � � � � � > > -- ------------------------------------------------------------------------ Anthony Molinaro