From user-return-64669-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Tue Oct 29 15:36:25 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1CA901804BB for ; Tue, 29 Oct 2019 16:36:25 +0100 (CET) Received: (qmail 21525 invoked by uid 500); 29 Oct 2019 15:36:07 -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 21430 invoked by uid 99); 29 Oct 2019 15:36:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Oct 2019 15:36:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1F76E1A323B for ; Tue, 29 Oct 2019 15:36:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.003 X-Spam-Level: X-Spam-Status: No, score=0.003 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id j7jE2_PLOyQj for ; Tue, 29 Oct 2019 15:36:02 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.210.45; helo=mail-ot1-f45.google.com; envelope-from=paul.carlucci@gmail.com; receiver= Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id EFF22BC883 for ; Tue, 29 Oct 2019 15:36:01 +0000 (UTC) Received: by mail-ot1-f45.google.com with SMTP id b16so10095105otk.9 for ; Tue, 29 Oct 2019 08:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3NtVwLbhLPBg7nnga29j7/Wv00ewCytJFXeel+zpwzc=; b=qdsoqowUz3AD88SAObFLJvMO3Px6xYnCb1334V0ggI8YZErwdGiEHs5GrHn3FmfmL6 /GCE/Ikp64nctCaJ1lz42ZTD3xbYrhN7bu4sB2GGdVNQz7QDDFRWB7VjYAKPNJOZd/kp NuZfG1Kml48z+YZKGJf3x87qtT+f0YVjom9jxhz765nKdcs/0BwIoeVdpl4OgQ6YvG3/ vCK5ITkiut2FOb47oGuYoh7xEHZWNvOVoXuUqvafSY1x4wK7mzRd87Q+aHGOSOrCKTjR CU8WGT9g9J6eQI4QaPsfsX1R+ypI3Q57AoOWoqJFCrNSEPzNNOpYebJGknbG3z3KRDZL k63Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3NtVwLbhLPBg7nnga29j7/Wv00ewCytJFXeel+zpwzc=; b=iipMU5ekp/GP3hFMvRi15AY/qaJRQOOvj7Q3+27ZAyP8kPGCmxxR5xhruaRBXMRtJW Y5SOfK/vxmToUzG7ghPeapq/8OO+1VZyXBWM8sWcce1XP3hOjCz3HbalNggZf65uTF7N Do0vR0rOaKEaBCm7AI33AC/Mb0d/uKXF1NuaML/oHXcnx6n00eKK9K7lyoapVQC8DSFp MxPr2adiI4r8OsAkA/n0Y+FLV4LICZv0GF0B9yC/KhnSi+4riW86wyY2fnsuRG4Bqieo Oi8jG8TptSUNUUpq0jpr4KGUYnowzC6a+vsyGU4KIt50FGtToA55XQAduMOD3SB9Nc6c UW7Q== X-Gm-Message-State: APjAAAX1toK/9mmaU9XshrqwCFtUihl6uQSdZMkNPMB/OC8nGx8nsvB+ RppAgEdaifUh6t6p1V9N1xdapREGPNmz30AG/8d5gQ== X-Google-Smtp-Source: APXvYqxV4181jsYIVTw/pY6dUB7TkcaZBnR4A/jPDf+4/q7rwrzZF4y4zDzf6Dyac7NWiCOiZDbIHal7mCM0Bxsmn+s= X-Received: by 2002:a9d:6a50:: with SMTP id h16mr1059383otn.120.1572363354569; Tue, 29 Oct 2019 08:35:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Carlucci Date: Tue, 29 Oct 2019 11:35:42 -0400 Message-ID: Subject: Re: Keyspace Clone in Existing Cluster To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary="00000000000035028f05960e5fe7" --00000000000035028f05960e5fe7 Content-Type: text/plain; charset="UTF-8" Copy the schema from your source keyspace to your new target keyspace, nodetool snapshot on your source keyspace, copy the SSTable files over, do a rolling bounce, repair, enjoy. In my experience a rolling bounce is easier than a nodetool refresh. It's either that or just copy it with Spark. On Tue, Oct 29, 2019, 11:19 AM Ankit Gadhiya wrote: > Thanks Alex. So How do I copy SSTables from 1.0 to 2.0? (Same > SSTableLoader or any other approach?) > Also since I've multi-node cluster - I'll have to do this on every single > node - is there any tool or better way to execute this just from a single > node? > > *Thanks & Regards,* > *Ankit Gadhiya* > > > > On Tue, Oct 29, 2019 at 11:16 AM Alex Ott wrote: > >> You can create all tables in new keyspace, copy SSTables from 1.0 to 2.0 >> tables & use nodetool refresh on tables in KS 2.0 to say Cassandra about >> them. >> >> On Tue, Oct 29, 2019 at 4:10 PM Ankit Gadhiya >> wrote: >> >>> Hello Folks, >>> >>> Greetings!. >>> >>> I've a requirement in my project to setup Blue-Green deployment for >>> Cassandra. E.x. Say My current active schema (application pointing to) is >>> Keyspace V1.0 and for my next release I want to setup Keysapce 2.0 (with >>> some structural changes) and all testing/validation would happen on it and >>> once successful , App would switch connection to keyspace 2.0 - This would >>> be generic release deployment for our project. >>> >>> One of the approach we thought of would be to Create keyspace 2.0 as >>> clone from Keyspace 1.0 including data using sstableloader but this would >>> be time consuming, also being a multi-node cluster (6+6 in each DC) - it >>> wouldn't be very feasible to do this manually on all the nodes for multiple >>> tables part of that keyspace. Was wondering if we have any other creative >>> way to suffice this requirement. >>> >>> Appreciate your time on this. >>> >>> >>> *Thanks & Regards,* >>> *Ankit Gadhiya* >>> >>> >> >> -- >> With best wishes, Alex Ott >> http://alexott.net/ >> Twitter: alexott_en (English), alexott (Russian) >> > --00000000000035028f05960e5fe7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Copy the schema from your source keyspace to your new tar= get keyspace, nodetool snapshot on your source keyspace, copy the SSTable f= iles over, do a rolling bounce, repair, enjoy.=C2=A0 In my experience a rol= ling bounce is easier than a nodetool refresh.

<= div dir=3D"auto">It's either that or just copy it with Spark.

On T= ue, Oct 29, 2019, 11:19 AM Ankit Gadhiya <ankitgadhiya@gmail.com> wrote:
Thanks Alex. So How do I copy SSTables from 1.0 = to 2.0? (Same SSTableLoader or any other approach?)=C2=A0
Also since I= 9;ve multi-node cluster - I'll have to do this on every single node - i= s there any tool or better way to execute this just from a single node?
Thanks & Regards,
Ankit Gadhiya<= br>


On Tue, Oct 29, 2019 at 11:16 AM Alex Ott <= ;= alexott@gmail.com> wrote:
You can create all tables in new keyspace= , copy SSTables from 1.0 to 2.0 tables & use nodetool refresh on tables= in KS 2.0 to say Cassandra about them.

On Tue, Oct 29, 2019 at 4:10 PM = Ankit Gadhiya <ankitgadhiya@gmail.com> wrote:
Hello Folks,
<= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">
G= reetings!.

I've a requirement in my project to setup Blue-Green de= ployment for Cassandra. E.x. Say My current active schema (application poin= ting to) is Keyspace V1.0 and for my next release I want to setup Keysapce = 2.0 (with some structural changes) and all testing/validation would happen = on it and once successful=C2=A0, App would switch connection to keyspace 2.= 0 - This would be generic release deployment for our project.

One of t= he approach we thought of would be to Create keyspace 2.0 as clone from Key= space 1.0 including data using sstableloader but this would be time consumi= ng, also being a multi-node cluster (6+6 in each DC) - it wouldn't be v= ery feasible to do this manually on all the nodes for multiple tables part = of that keyspace. Was wondering if we have any other creative way to suffic= e this requirement.

Appreciate your time on this.


=
Ankit Gadhiya



--
With best wishes, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0Alex Ott
http://alexott.net/
Twitter: alexot= t_en (English), alexott (Russian)
--00000000000035028f05960e5fe7--