Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 26721 invoked from network); 24 Sep 2010 16:36:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Sep 2010 16:36:06 -0000 Received: (qmail 58423 invoked by uid 500); 24 Sep 2010 16:36:05 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 58383 invoked by uid 500); 24 Sep 2010 16:36:04 -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 58375 invoked by uid 99); 24 Sep 2010 16:36:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 16:36:04 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 16:35:58 +0000 Received: by fxm6 with SMTP id 6so2197963fxm.31 for ; Fri, 24 Sep 2010 09:35:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.121.20 with SMTP id y20mr429364mum.5.1285346136731; Fri, 24 Sep 2010 09:35:36 -0700 (PDT) Received: by 10.102.228.2 with HTTP; Fri, 24 Sep 2010 09:35:36 -0700 (PDT) X-Originating-IP: [64.132.24.248] In-Reply-To: References: Date: Fri, 24 Sep 2010 11:35:36 -0500 Message-ID: Subject: Re: LongType from user input From: Tyler Hobbs To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=001636c5b18fe4b2a4049103f7d6 --001636c5b18fe4b2a4049103f7d6 Content-Type: text/plain; charset=ISO-8859-1 Yes, you can use describe_keyspace() and then look through the results. It's a little ugly in 0.6, but it works. - Tyler On Fri, Sep 24, 2010 at 11:25 AM, Christian Decker < decker.christian@gmail.com> wrote: > Well I'm writing a loading function for Pig, and as it happens I want to be > able to load slices from cassandra which are specified in the pig script > (thus the input from stdin) but the ColumnFamily from which to read the data > is another parameter and some of the CFs have UTF8, UUID, TimeUUID or Long > types for their keys and columns, so simply converting everything I get to > an 8byte long would break compatibility with the others. > Now thinking about it I attacked the whole problem in a weird way, since > UUID types won't work either. > So let me change my question slightly, is there a way in 0.6 to detect the > compareWith type on a running cluster? That way I could convert it to the > right type :D > > Regards, > Chris > > On Fri, Sep 24, 2010 at 6:09 PM, Tyler Hobbs wrote: > >> I'm not sure I understand why using this with multiple column families >> prevents you from converting it. Could you clarify this? >> >> >> On Fri, Sep 24, 2010 at 10:56 AM, Christian Decker < >> decker.christian@gmail.com> wrote: >> >>> Hi all, >>> >>> I'm having quite a dilemma with the CompareWith attribute. The Problem is >>> that I have numeric IDs that I'd like to use as row keys, only that I also >>> have to offer a possibility to let users input them from std input. Since I >>> cannot ask my users to input an 8byte sequence representing the ID they'd >>> like, I was about to turn to UTF8, when I remembered that they are compared >>> lexicographically, so that 100 actually comes before 2, which kills key >>> slices. Also I cannot just code a converter in since this is supposed to be >>> a used with multiple columnfamilies, so just converting an integer read into >>> 8bytes isn't going to work either. >>> Any tricks for this one? >>> >>> Regards, >>> Chris >>> >> >> > --001636c5b18fe4b2a4049103f7d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes, you can use describe_keyspace() and then look through the results.=A0 = It's a little ugly in 0.6, but it works.

- Tyler

On Fri, Sep 24, 2010 at 11:25 AM, Christian Decker <decker.chris= tian@gmail.com> wrote:
Well I'm writ= ing a loading function for Pig, and as it happens I want to be able to load= slices from cassandra which are specified in the pig script (thus the inpu= t from stdin) but the ColumnFamily from which to read the data is another p= arameter and some of the CFs have UTF8, UUID, TimeUUID or Long types for th= eir keys and columns, so simply converting everything I get to an 8byte lon= g would break compatibility with the others.
Now thinking about it I attacked the whole problem in a weird way, since UU= ID types won't work either.
So let me change my question slightly, = is there a way in 0.6 to detect the compareWith type on a running cluster? = That way I could convert it to the right type :D

Regards,
Chris

On Fri, Sep 24, 2010 at 6:09 P= M, Tyler Hobbs <tyler@riptano.com> wrote:
I'm not sure = I understand why using this with multiple column families prevents you from= converting it.=A0 Could you clarify this?


On Fri, Sep 24, 2010 at = 10:56 AM, Christian Decker <decker.christian@gmail.com> wrote:
Hi all,

<= /div>
I'm having quite a dilemma with the CompareWith attribute. Th= e Problem is that I have numeric IDs that I'd like to use as row keys, = only that I also have to offer a possibility to let users input them from s= td input. Since I cannot ask my users to input an 8byte sequence representi= ng the ID they'd like, I was about to turn to UTF8, when I remembered t= hat they are compared lexicographically, so that 100 actually comes before = 2, which kills key slices. Also I cannot just code a converter in since thi= s is supposed to be a used with multiple columnfamilies, so just converting= an integer read into 8bytes isn't going to work either.
Any tricks for this one?

Regards,
=
Chris



--001636c5b18fe4b2a4049103f7d6--