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 7D3D7E596 for ; Fri, 8 Feb 2013 03:10:03 +0000 (UTC) Received: (qmail 21557 invoked by uid 500); 8 Feb 2013 03:10:00 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 21526 invoked by uid 500); 8 Feb 2013 03:10:00 -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 21502 invoked by uid 99); 8 Feb 2013 03:09:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 03:09: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 (athena.apache.org: domain of edlinuxguru@gmail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-wg0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 03:09:53 +0000 Received: by mail-wg0-f45.google.com with SMTP id dq12so2516806wgb.0 for ; Thu, 07 Feb 2013 19:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=nVsvWwXvtsczEUZYCosKKx6Z47v5eJd6b2/BdlrcH5k=; b=nAvErkSkPHQ1L+tl0c5I42T/sDJTZ8FhxhNVZe+eWkLCmwyMw6Q6yaQ+HNOwcr8pYn Es9UD4rXVbp/Q3BatxuuNo8zP1qchdKYBsMwMoRjPNAuyb0CbVaUZwxycyBX83zRiIy5 N4Hlxpdroobzj8If89ZjPI8D/U/C3wwjG/W6P01U5vFjehsh/2Q0h837gSFy28DfJ2Pk 4XDT+MwiVFpaXm5xTy9RQpK7rXBkkxT5xM7PMg547Ru6JaWNX4i33M6FMAd6gV01kU3u e59vPUh3H0NaG3HCglyVMQ/1QAvsnBuzh0cM0IbcqCmXJy789IxON96A1wajp0rIxXBH mNcA== MIME-Version: 1.0 X-Received: by 10.194.174.196 with SMTP id bu4mr6763747wjc.35.1360292972083; Thu, 07 Feb 2013 19:09:32 -0800 (PST) Received: by 10.194.165.228 with HTTP; Thu, 7 Feb 2013 19:09:32 -0800 (PST) In-Reply-To: References: Date: Thu, 7 Feb 2013 22:09:32 -0500 Message-ID: Subject: Re: Why CQL returns data in byte format, while Hive de-serialize and return the data in readable format From: Edward Capriolo To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=089e0149331a643a1204d52de377 X-Virus-Checked: Checked by ClamAV on apache.org --089e0149331a643a1204d52de377 Content-Type: text/plain; charset=ISO-8859-1 In cql3 a column must be all the same type . Since cql transposes columns the only thing they can be is byte array. Cql2 is better at compact tables in. This regard. On Thursday, February 7, 2013, Dinusha Dilrukshi wrote: > Hi, > > We are using same underlying column family and extract the data using Hive > query and CQL query. > Column family meta data contains Comparator='IntegerType' > and default_validation_class = FloatType. > > CREATE COLUMN FAMILY cpu_avg_5min > WITH COMPARATOR = 'IntegerType' > AND key_validation_class = UTF8Type > AND default_validation_class = FloatType; > > Queering through Hive using a Hive query returns readable data while > queering using CQL returns byte format. > > Hive query result: > localhost:8282 1350465600 71.0 > localhost:8282 1350466500 69.0 > > CQL query result: > localhost:8282 | 232340574229062120517680 | 1.0561e-05 > localhost:8282 | 232340574229062137229360 | 2.7594e-06 > > Can someone explains the above behavior ? > > Regards, > DInusha. > --089e0149331a643a1204d52de377 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable In cql3 a column must be all the same type . Since cql transposes columns t= he only thing they can be is byte array. Cql2 is better at compact tables i= n. This regard.


On Thursday, February 7, 2013, Din= usha Dilrukshi wrote:
Hi,

We are using same=A0u= nderlying column family and extract the data using Hive query and CQL query= .=A0
Column family meta data contains Comparator=3D'IntegerType' = =A0and=A0default_validation_class =3D FloatType.

CREATE COLUMN FAMILY cpu_avg_5min=20
WITH COMPARATOR =3D 'IntegerType'=20
=A0AND key_validation_class =3D UTF8Type
=A0AND default_validation_class =3D FloatType; =A0

Queering through Hive using a Hive query returns readable data while queer= ing using CQL returns byte format.

Hive query resu= lt:
localhost:8282 1350465600 71.0
localhost:8282 1350466500 69.0=A0

CQL query resu= lt:
=A0localhost:8282 | 232340574229062120517680 | 1.0561e-05
=A0localhost:8282 | 232340574229062137229360 | 2.7594e-06=A0

Can someone explains the above=A0behavior ?
=

Regards,
DInusha.
--089e0149331a643a1204d52de377--