From user-return-37663-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Fri Nov 22 22:49:07 2013 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 D154E10D07 for ; Fri, 22 Nov 2013 22:49:07 +0000 (UTC) Received: (qmail 4014 invoked by uid 500); 22 Nov 2013 22:49:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 3949 invoked by uid 500); 22 Nov 2013 22:49:05 -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 3940 invoked by uid 99); 22 Nov 2013 22:49:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 22:49:04 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bryce.godfrey@avanade.com designates 207.46.163.26 as permitted sender) Received: from [207.46.163.26] (HELO co9outboundpool.messaging.microsoft.com) (207.46.163.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 22:48:56 +0000 Received: from mail215-co9-R.bigfish.com (10.236.132.228) by CO9EHSOBE027.bigfish.com (10.236.130.90) with Microsoft SMTP Server id 14.1.225.22; Fri, 22 Nov 2013 22:48:34 +0000 Received: from mail215-co9 (localhost [127.0.0.1]) by mail215-co9-R.bigfish.com (Postfix) with ESMTP id 611961A00DF for ; Fri, 22 Nov 2013 22:48:34 +0000 (UTC) X-Forefront-Antispam-Report: CIP:12.129.10.20;KIP:(null);UIP:(null);IPV:NLI;H:seaexmsmtp.avanade.com;RD:avanade.com;EFVD:NLI X-SpamScore: -1 X-BigFish: VPS-1(zzc85fh4015Izz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6hzz1d7338h17326ah8275bh8275dh18c673h1de097h186068hz2fh109h2a8h839hd25hf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1b0ah1bceh224fh1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1fe8h1ff5h20f0h2216h22d0h1155h) Received-SPF: pass (mail215-co9: domain of avanade.com designates 12.129.10.20 as permitted sender) client-ip=12.129.10.20; envelope-from=bryce.godfrey@avanade.com; helo=seaexmsmtp.avanade.com ;.avanade.com ; Received: from mail215-co9 (localhost.localdomain [127.0.0.1]) by mail215-co9 (MessageSwitch) id 1385160512522707_5717; Fri, 22 Nov 2013 22:48:32 +0000 (UTC) Received: from CO9EHSMHS023.bigfish.com (unknown [10.236.132.248]) by mail215-co9.bigfish.com (Postfix) with ESMTP id 7B1F21002A3 for ; Fri, 22 Nov 2013 22:48:32 +0000 (UTC) Received: from seaexmsmtp.avanade.com (12.129.10.20) by CO9EHSMHS023.bigfish.com (10.236.130.33) with Microsoft SMTP Server (TLS) id 14.16.227.3; Fri, 22 Nov 2013 22:48:32 +0000 Received: from SEAPEXMHT03.corp.avanade.org (10.33.28.13) by SEAPEXMEDGE04.corp.avanade.org (10.33.2.243) with Microsoft SMTP Server (TLS) id 14.3.123.3; Fri, 22 Nov 2013 14:48:25 -0800 Received: from SEAPEXMDAG11.corp.avanade.org ([fe80::a85b:17eb:52d6:be3]) by SEAPEXMHT03.corp.avanade.org ([::1]) with mapi id 14.03.0158.001; Fri, 22 Nov 2013 14:48:31 -0800 From: Bryce Godfrey To: "user@cassandra.apache.org" Subject: CQL and counters Thread-Topic: CQL and counters Thread-Index: Ac7n1ONXEWrt4zoHS8esH625qB9Slw== Date: Fri, 22 Nov 2013 22:48:31 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.33.20.12] Content-Type: multipart/alternative; boundary="_000_A6E5706FAAB1DA44B6AA11E8FD10A8FE18C076EDSEAPEXMDAG11cor_" MIME-Version: 1.0 X-OriginatorOrg: avanade.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-Virus-Checked: Checked by ClamAV on apache.org --_000_A6E5706FAAB1DA44B6AA11E8FD10A8FE18C076EDSEAPEXMDAG11cor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I'm looking for some guidance on how to model some stat tracking over time,= bucketed to some type of interval (15 min, hour, etc). As an example, let's say I would like to track network traffic throughput a= nd bucket it to 15 minute intervals. In our old model, using thrift I woul= d create a column family set to counter, and use a timestamp ticks for the = column name for a "total" and "count" column. And as data was sampled, we = would increment count by one, and increment the total with the sampled valu= e for that time bucket. The column name would give us the datetime for the= values, as well as provide me with a convenient row slice query to get a d= ate range for any given statistic. Key | 1215 | 1230 | 1245 NIC1:Total | 100 | 56 | 872 NIC1:Count | 15 | 15 | 15 Then given the total/count I can show an average over time. In CQL it seems like I can't do new counter columns at runtime unless they = are defined in the schema first or run an ALTER statement, which may not be= the correct way to go. So is there a better way to model this type of dat= a with the new CQL world? Nor do I know how to query that type of data, si= milar to the row slice by column name. Thanks, Bryce --_000_A6E5706FAAB1DA44B6AA11E8FD10A8FE18C076EDSEAPEXMDAG11cor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m looking for some guidance on how to model = some stat tracking over time, bucketed to some type of interval (15 min, ho= ur, etc). 

 

As an example, let’s say I would like to track= network traffic throughput and bucket it to 15 minute intervals.  In = our old model, using thrift I would create a column family set to counter, = and use a timestamp ticks for the column name for a “total” and “count” column.  And as dat= a was sampled, we would increment count by one, and increment the total wit= h the sampled value for that time bucket.  The column name would give = us the datetime for the values, as well as provide me with a convenient row slice query to get a date range for any given statistic.

 

Key          = ;      | 1215  | 1230 | 1245<= /p>

NIC1:Total   | 100    | 56&= nbsp;     |  872

NIC1:Count | 15      | 15&n= bsp;     | 15

 

Then given the total/count I can show an average ove= r time.

 

In CQL it seems like I can’t do new counter co= lumns at runtime unless they are defined in the schema first or run an ALTE= R statement, which may not be the correct way to go.  So is there a be= tter way to model this type of data with the new CQL world?  Nor do I know how to query that type of data, similar= to the row slice by column name.

 

Thanks,

Bryce

--_000_A6E5706FAAB1DA44B6AA11E8FD10A8FE18C076EDSEAPEXMDAG11cor_--