incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dinusha Dilrukshi <sdddilruk...@gmail.com>
Subject Re: Why CQL returns data in byte format, while Hive de-serialize and return the data in readable format
Date Fri, 08 Feb 2013 09:13:23 GMT
[1] If we insert the data using CQL and retrieve using CQL then it returns
readable data. (not byte type).
[2] If we insert the data using hive query and retrieve using hive query,
it also returns readable data. (not byte type.)
[3] Only if we insert data using hive query and then retrieve the data
using CQL, then it returns byte type.

How data serialization/de-serialization happens in Cassandra. Why [3]
returns data in byte format, while same data returns true hive query is not
in byte type ?

Regards,
Dinusha.



On Fri, Feb 8, 2013 at 8:39 AM, Edward Capriolo <edlinuxguru@gmail.com>wrote:

> 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.
>>
>

Mime
View raw message