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 B438610614 for ; Sat, 1 Mar 2014 00:33:18 +0000 (UTC) Received: (qmail 30792 invoked by uid 500); 1 Mar 2014 00:33:15 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 30741 invoked by uid 500); 1 Mar 2014 00:33:15 -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 30732 invoked by uid 99); 1 Mar 2014 00:33:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2014 00:33:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clint.kelly@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yh0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Mar 2014 00:33:09 +0000 Received: by mail-yh0-f44.google.com with SMTP id f73so1577030yha.31 for ; Fri, 28 Feb 2014 16:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=P04FALuBi/FPBnkAVu8UcxddYBWmjVuCXw+EfWyh31Q=; b=mQ7xGuGiPgWPjbzVfWeMn410EmrKGTRzRRftEUvEeYGI1zG8Y6hRulVwT9qVkOhz6M yDfBOJeRQD86NzFnoh22gc+az5ASvaTpZ8fAePvIqLblQwRck9DDIgTa4SdIRRO70aHG Xi51x2t52pnrD/J4+RH/KVBbiItbn4sx9X0L+lCrpliaYWk+5+GLvIv1kzOwM2h0zooe 2HCAGWikc7s5Hh40vwQvh3nhfBW76mnoJd6Y7FDC3k5ED8uZDTRiIQ0cHzCjxIvNZeho guMMRECADGuH14irHxRiwHwE4RUDV3SewDMRRqfnCzsYQ+IJAxJtFK8/bdqifGV48NaB Pv6g== MIME-Version: 1.0 X-Received: by 10.236.101.227 with SMTP id b63mr5250057yhg.37.1393633968917; Fri, 28 Feb 2014 16:32:48 -0800 (PST) Received: by 10.170.75.87 with HTTP; Fri, 28 Feb 2014 16:32:48 -0800 (PST) Date: Fri, 28 Feb 2014 16:32:48 -0800 Message-ID: Subject: Resetting a counter in CQL From: Clint Kelly To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=20cf300e51e5aa119a04f380b192 X-Virus-Checked: Checked by ClamAV on apache.org --20cf300e51e5aa119a04f380b192 Content-Type: text/plain; charset=ISO-8859-1 Folks, What is the best known method for resetting a counter in CQL? Is it best to read the counter and then increment it by a negative amount? Or to delete the row and then increment it by zero? These are the two methods I could come up with. Both of these seem fine to me---I'm just wondering if there is a standard way to do this. Thanks! Best regards, Clint --20cf300e51e5aa119a04f380b192 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Folks,

What is the best known method for reset= ting a counter in CQL?=A0 Is it best to read the counter and then increment= it by a negative amount?=A0 Or to delete the row and then increment it by = zero?

These are the two methods I could come up with.=A0 Both of these = seem fine to me---I'm just wondering if there is a standard way to do t= his.=A0 Thanks!

Best regards,
Clint
--20cf300e51e5aa119a04f380b192--