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 A5E10793A for ; Wed, 17 Aug 2011 12:36:57 +0000 (UTC) Received: (qmail 78834 invoked by uid 500); 17 Aug 2011 12:36:55 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 78227 invoked by uid 500); 17 Aug 2011 12:36:49 -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 78218 invoked by uid 99); 17 Aug 2011 12:36:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2011 12:36:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of watcherfr@gmail.com designates 209.85.160.172 as permitted sender) Received: from [209.85.160.172] (HELO mail-gy0-f172.google.com) (209.85.160.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2011 12:36:42 +0000 Received: by gyf3 with SMTP id 3so746526gyf.31 for ; Wed, 17 Aug 2011 05:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=+xJAthBupf0r9+iyDwY0Ix1V33WyJWsP2JD3HltXMfU=; b=gzDDS0JIJ2353ZbxPWB2S55Gvy+5ZSlge7Sg4fod8IvqWxiu5k/7vBF1r1yCP6vjVe AYKcOm01JaCQv5ShsMDPqnzzCiIjCe4GbKTNcsMyNDes35/j2BGSj6DWRn6kgUQnDbqv uViYGwekb8o0fp9++vgd4mL/1rG3rK4blduhI= MIME-Version: 1.0 Received: by 10.142.225.4 with SMTP id x4mr446524wfg.86.1313584581628; Wed, 17 Aug 2011 05:36:21 -0700 (PDT) Received: by 10.142.203.21 with HTTP; Wed, 17 Aug 2011 05:36:21 -0700 (PDT) In-Reply-To: <9B92270C-066D-4CBE-A48A-152E597F8622@thelastpickle.com> References: <9B92270C-066D-4CBE-A48A-152E597F8622@thelastpickle.com> Date: Wed, 17 Aug 2011 14:36:21 +0200 Message-ID: Subject: Re: Bulk loading into live data From: Philippe To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=000e0cd312485ed43f04aab2bea4 --000e0cd312485ed43f04aab2bea4 Content-Type: text/plain; charset=ISO-8859-1 > > What if the column is a counter ? Does it overwrite or increment ? Ie if > the SST I am loading has the exact same setup but value 2, will my value > change to 3 ? > > Counter columns only know how to increment (assuming no deletes), so you > will get 3. See > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java#L153 > and > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/CounterColumn.java#L138 > Great, so I assume that I can "add" the same counter column multiple times for the same key/SC in different nextRow() calls and the counter will still get incremented ? My use-case is that my bulk loading has data that's aggregated at a finer granularity than the data in cassandra. Thanks --000e0cd312485ed43f04aab2bea4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
<= font color=3D"#666666" face=3D"Arial, Helvetica, sans-serif">What if the column is a counter ? Does it overwrite or = increment ? Ie if the SST I am loading has the exact same setup but value 2= , will my value change to 3 ?
Counter columns only know how to increment (assuming no = deletes), so you will get 3. See=A0https://github.com/apache/cassandr= a/blob/trunk/src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimple= Writer.java#L153=A0and=A0https://github.com/apache/cassandra/blob/trunk/src/java/org/ap= ache/cassandra/db/CounterColumn.java#L138
Great, so I assume that I can "add" the s= ame counter column multiple times for the same key/SC in different nextRow(= ) calls and the counter will still get incremented ?
My use-case = is that my bulk loading has data that's aggregated at a finer granulari= ty than the data in cassandra.

Thanks

--000e0cd312485ed43f04aab2bea4--