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 D981ACF78 for ; Fri, 13 Jul 2012 07:31:59 +0000 (UTC) Received: (qmail 18298 invoked by uid 500); 13 Jul 2012 07:31:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 18129 invoked by uid 500); 13 Jul 2012 07:31:56 -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 18103 invoked by uid 99); 13 Jul 2012 07:31:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2012 07:31:55 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rohit2412@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2012 07:31:49 +0000 Received: by obbwc20 with SMTP id wc20so4845629obb.31 for ; Fri, 13 Jul 2012 00:31:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dYZfbNStjtRp3KT14t7vhK4VNa9bDRgAb25SIC1ePbI=; b=U5R6YlxvBXnLZEzNzsl1dcNEwaWmDAD33TMFLrcGFlwOk6zcHfV1aq9jCreJUWRLia 7rTOl81p5foO6LV4jQVaurTz1I5/ejtbS6WrL9+NiIFBbNltoI3ipJaaTX75ycztNSIK 6qJrTlAG8S4NZBtaXPoUpWZXq5B/afspZ/17QxVApnNmBXjo30iMTbT8UgIkHXl8f/6R EJWOw0A7y0XTc4bX2YgxPma1jS0jnmLoxosgDRKS8VBsk/jyElaUoyOxCbwEM9wh/+c9 alNiA5kbR21sd/tzBXmJEMuckHl23wRhzX4ic576gvZEmXHtUg1MxAXzUIHB3vcNYAtl zFWQ== MIME-Version: 1.0 Received: by 10.182.146.84 with SMTP id ta20mr152426obb.19.1342164688044; Fri, 13 Jul 2012 00:31:28 -0700 (PDT) Received: by 10.76.93.37 with HTTP; Fri, 13 Jul 2012 00:31:28 -0700 (PDT) In-Reply-To: <231A02BE-945D-4A68-B871-3B67894757B3@thelastpickle.com> References: <231A02BE-945D-4A68-B871-3B67894757B3@thelastpickle.com> Date: Fri, 13 Jul 2012 13:01:28 +0530 Message-ID: Subject: Re: Using a node in separate cluster without decommissioning. From: rohit bhatia To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Hi Just wanted to say that it worked. I also made sure to modify thrift rpc_port and storage port so that the two clusters don't interfere. Thanks for the suggestion Thanks Rohit On Thu, Jul 12, 2012 at 10:01 AM, aaron morton wrote: > Since replication factor is 2 in first cluster, I > won't lose any data. > > Assuming you have been running repair or working at CL QUORUM (which is the > same as CL ALL for RF 2) > > Is it advisable and safe to go ahead? > > um, so the plan is to turn off 2 nodes in the first cluster, restask them > into the new cluster and then reverse the process ? > > If you simply turn two nodes off in the first cluster you will have reduce > the availability for a portion of the ring. 25% of the keys will now have at > best 1 node they can be stored on. If a node is having any sort of problems, > and it's is a replica for one of the down nodes, the cluster will appear > down for 12.5% of the keyspace. > > If you work at QUORUM you will not have enough nodes available to write / > read 25% of the keys. > > If you decomission the nodes, you will still have 2 replicas available for > each key range. This is the path I would recommend. > > If you _really_ need to do it what you suggest will probably work. Some > tips: > > * do safe shutdowns - nodetool disablegossip, disablethrift, drain > * don't forget to copy the yaml file. > * in the first cluster the other nodes will collect hints for the first hour > the nodes are down. You are not going to want these so disable HH. > * get the nodes back into the first cluster before gc_grace_seconds expires. > * bring them back and repair them. > * when you bring them back, reading at CL ONE will give inconsistent > results. Reading at QUOURM may result in a lot of repair activity. > > Hope that helps. > > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 11/07/2012, at 6:35 AM, rohit bhatia wrote: > > Hi > > I want to take out 2 nodes from a 8 node cluster and use in another > cluster, but can't afford the overhead of streaming the data and > rebalance cluster. Since replication factor is 2 in first cluster, I > won't lose any data. > > I'm planning to save my commit_log and data directories and > bootstrapping the node in the second cluster. Afterwards I'll just > replace both the directories and join the node back to the original > cluster. This should work since cassandra saves all the cluster and > schema info in the system keyspace. > > Is it advisable and safe to go ahead? > > Thanks > Rohit > >