From user-return-63654-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Thu Apr 11 09:35: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 E28C618065D for ; Thu, 11 Apr 2019 11:35:24 +0200 (CEST) Received: (qmail 38658 invoked by uid 500); 11 Apr 2019 09:34:11 -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 38629 invoked by uid 99); 11 Apr 2019 09:34:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Apr 2019 09:34:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 14660C7ABF for ; Thu, 11 Apr 2019 09:34:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.5 X-Spam-Level: X-Spam-Status: No, score=-0.5 tagged_above=-999 required=6.31 tests=[DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=redshots.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id XwJ6MXel0_jM for ; Thu, 11 Apr 2019 09:34:08 +0000 (UTC) Received: from hermes.krystal.co.uk (hermes.krystal.co.uk [77.72.1.66]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4CDF95F29D for ; Thu, 11 Apr 2019 09:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=redshots.com; s=default; h=Message-Id:In-Reply-To:To:References:Date: Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6muG8pzkX+e3bkUuG6HfTKEAmsjBKsDZrS5I3OWYpTc=; b=axrF9wb3RnNnbsU8UbngI+zkvC FGy5HcRsS4M+LNN8mVZZcRxvdJo1oXjRC/tTHPK+9DNi6pAQh/j4VkL7aXd8YLpzcyo2Ros7Q0YGB v1j7/ibgToUaJqkffgXujW9+sHTA+GcSCqE+bi3zzuvF+BA4CtiHTZhcbZQs+mViuK+fN3jKf5Kmp MbalmkGXlEZBafhkU8z6wuu6C3QhKubIbXqWfR8N41by5bj1GnCzlmfIxOBWUzk9xd5kF1h//EFgO IvtlyyQ2dTaP4I9IGlfxe2gX4l1Iw1JSC9l6bSygnyMS9WwB1n1O/ZvhHKtCMwugT+MzCcqROtTYU r/VVr0wQ==; Received: from [88.97.79.59] (port=49829 helo=pauls-mbp.lan) by hermes.krystal.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hEVxS-003Ocn-SS for user@cassandra.apache.org; Thu, 11 Apr 2019 10:25:22 +0100 From: Paul Chandler Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: cass-2.2 trigger - how to get clustering columns and value? Date: Thu, 11 Apr 2019 10:25:22 +0100 References: To: user@cassandra.apache.org In-Reply-To: Message-Id: <9A70B703-502E-44EA-82EF-503BBBF12D2E@redshots.com> X-Mailer: Apple Mail (2.3445.9.1) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hermes.krystal.co.uk X-AntiAbuse: Original Domain - cassandra.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - redshots.com X-Get-Message-Sender-Via: hermes.krystal.co.uk: authenticated_id: paul@redshots.com X-Authenticated-Sender: hermes.krystal.co.uk: paul@redshots.com Hi Carl, I now this is not exactly answering your question, but it may help with = the split. I have split a multi tenancy cluster several times using a similar = process to TLP=E2=80=99s Data Centre Switch: = http://thelastpickle.com/blog/2019/02/26/data-center-switch.html However instead of phase 3, we have split the cluster, by changing the = seeds definition to only point at nodes within their own DC, and change = the cluster name of the new DC. This last step does require a short = downtime of the cluster. We have had success with this method, and if you are only want to track = the updates to feed into the new cluster, this this will work, however = it you want it for anything else then it doesn=E2=80=99t help at all. I can supply more details later if this method is of interest.=20 Thanks=20 Paul Chandler=20 > On 10 Apr 2019, at 22:52, Carl Mueller = wrote: >=20 > We have a multitenant cluster that we can't upgrade to 3.x easily, and = we'd like to migrate some apps off of the shared cluster to dedicated = clusters. >=20 > This is a 2.2 cluster. >=20 > So I'm trying a trigger to track updates while we transition and will = send via kafka. Right now I'm just trying to extract all the data from = the incoming updates >=20 > so for=20 >=20 > public Collection augment(ByteBuffer key, ColumnFamily = update) { >=20 > the names returned by the update.getColumnNames() for an update of a = table with two clustering columns and had a regular column update = produced two CellName/Cells:=20 >=20 > one has no name, and no apparent raw value (bytebuffer is empty) >=20 > the other is the data column.=20 >=20 > I can extract the primary key from the key field >=20 > But how do I get the values of the two clustering columns? They aren't = listed in the iterator, and they don't appear to be in the key field. = Since clustering columns are encoded into the name of a cell, I'd = imagine there might be some "unpacking" trick to that.=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org For additional commands, e-mail: user-help@cassandra.apache.org