incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Dawrani <roshandawr...@gmail.com>
Subject Newbie question - fetching multiple columns of different datatypes and conversion from byte[]
Date Sat, 25 Dec 2010 04:44:27 GMT
Hi,

I am new to Cassandra and Hector and have a basic question on fetching
multiple columns of a row that have mixed data types.

So, I am basically doing equivalent of "Select dateCol1, dateCol2,
stringCol1, intCol1 from a_table where key in (?, ?, ?...)"

My question is do I need to do the conversion of columns from byte[] to
Date/String/Int myself after taking out data from the ColumnSlice?

For saving the same data, while adding the columns, I was able to tell which
serializer to use, but slice queries seem to take only one ValueSerializer
for all columns being retrieved. So, if I have got it correctly, I can only
use ByteBufferSerializer in the Hector API slice query call and then do
further data-type specific conversion myself at the app level?

-- 
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawrani <http://twitter.com/roshandawrani>
Skype: roshandawrani

Mime
View raw message