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 AA8B39AA3 for ; Tue, 28 Feb 2012 17:00:01 +0000 (UTC) Received: (qmail 97287 invoked by uid 500); 28 Feb 2012 16:59:59 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 97262 invoked by uid 500); 28 Feb 2012 16:59:59 -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 97254 invoked by uid 99); 28 Feb 2012 16:59:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 16:59:59 +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 (nike.apache.org: domain of philip.shon@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bk0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 16:59:52 +0000 Received: by bkuw5 with SMTP id w5so1866421bku.31 for ; Tue, 28 Feb 2012 08:59:32 -0800 (PST) Received-SPF: pass (google.com: domain of philip.shon@gmail.com designates 10.204.149.147 as permitted sender) client-ip=10.204.149.147; Authentication-Results: mr.google.com; spf=pass (google.com: domain of philip.shon@gmail.com designates 10.204.149.147 as permitted sender) smtp.mail=philip.shon@gmail.com; dkim=pass header.i=philip.shon@gmail.com Received: from mr.google.com ([10.204.149.147]) by 10.204.149.147 with SMTP id t19mr10178362bkv.124.1330448372548 (num_hops = 1); Tue, 28 Feb 2012 08:59:32 -0800 (PST) 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=nr7MLR9SIGL7U0SM0zl63DLTFdaZB3oV623GwJ7DbJE=; b=whdXOq0LBVE3Ec/r5nTaijRm63Ho5kkyuQk42lKWsWxeyO0nWxsLnJlUTzlYwoKTH1 0R49Ta6XqHhYMe7XmOX4ql+uduF0TsInJShLTv/wfGWn7t6H5VHJ+Q7Jy9RBdOHE42al o9ndKPu1cbHj+OqmbqUt4LfOiTrH5qVyAWIMg= MIME-Version: 1.0 Received: by 10.204.149.147 with SMTP id t19mr8219307bkv.124.1330448372451; Tue, 28 Feb 2012 08:59:32 -0800 (PST) Received: by 10.204.166.12 with HTTP; Tue, 28 Feb 2012 08:59:32 -0800 (PST) In-Reply-To: <41455AB5-CC61-4BD6-9D0B-36F2CF700E95@mindspring.com> References: <41455AB5-CC61-4BD6-9D0B-36F2CF700E95@mindspring.com> Date: Tue, 28 Feb 2012 10:59:32 -0600 Message-ID: Subject: Re: CompositeType/DynamicCompositeType for Row Key From: Philip Shon To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0015175d67c2a1ca3d04ba092633 X-Virus-Checked: Checked by ClamAV on apache.org --0015175d67c2a1ca3d04ba092633 Content-Type: text/plain; charset=UTF-8 My row keys will actually be a date range. Where the first value is the starting date and the second value will be the length of that date range. Each column inside each row will represent metadata related to a specific product on during that date range. My question would be do I get any advantages with using the CompositeType for my row key versus doing manual concatenation of the two values in my code? On Tue, Feb 28, 2012 at 10:41 AM, Chris Gerken wrote: > Phil, > > That's the problem with examples :) > > Row keys can be composite values. That works just fine. Was there > something in particular you were trying to do? > > - Chris > > Chris Gerken > > chrisgerken@mindspring.com > 512.587.5261 > http://www.linkedin.com/in/chgerken > > > > On Feb 28, 2012, at 10:25 AM, Philip Shon wrote: > > I have not found any examples of utilizing a CompositeType of > DynamicCompositeType as a row key. Is doing this frowned upon? All the > examples I've seen have been using a CompositeType only for Column names > (or values). > > My particular use case involves having the two components in the key being > a Date (no time component) and an Integer value. > > Thanks, > > Phil > > > > --0015175d67c2a1ca3d04ba092633 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
My row keys will actually be a date range. =C2=A0Where the first value= is the starting date and the second value will be the length of that date = range.

Each column inside each row will represent = metadata related to a specific product on during that date range.

My question would be do I get any advantages with using= the CompositeType for my row key versus doing manual concatenation of the = two values in my code?



On Tue, Feb 28, 2012 at 10:41 AM, Chris Gerken <chrisgerken@mindspring.com><= /span> wrote:
Phil,

That's the= problem with examples :)

Row keys can be composit= e values. =C2=A0That works just fine. =C2=A0Was there something in particul= ar you were trying to do?

- Chris


On Feb 28, 2012, at 10:25 AM, Philip Shon wrote:

I have not found any examples of utilizing a Composi= teType of DynamicCompositeType as a row key. =C2=A0Is doing this frowned up= on? All the examples I've seen have been using a CompositeType only for= Column names (or values).

My particular use case involves having the two components in= the key being a Date (no time component) and an Integer value.
<= br>
Thanks,

Phil




--0015175d67c2a1ca3d04ba092633--