incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Fortin <mi...@m410.us>
Subject Re: super_column.name?
Date Thu, 17 Mar 2011 21:20:42 GMT
Thanks for the response, sorry if my initial question wasn't clear.  

When using thrift, I call
client.get_slice(keyBytes, columnParent, range, level)

i get a list of ColumnOrSuperColumns back.  When I iterate over them and and call:
byte[] nameBytes = columnOrSuperColumn.getSuper_column().getName()

I seem to be getting a byte array that contains, not only the name of the super column, but
all of the child columns as well.  The output that start '? get_slice' is the byte array converted
to a string.  Shouldn't nameBytes only return the name of the superColumn?  In my case 'super-col-0'
in byte form?

This is using cassandra 0.7.0 & 0.7.4.

cheers,
M!ke

On Mar 17, 2011, at 9:43 AM, Sylvain Lebresne wrote:

> Are you sure you don't have a problem with handling ByteBuffers ?
> What do you mean by 'deserialized string' ?
> 
> --
> Sylvain
> 
> On Thu, Mar 17, 2011 at 4:20 AM, Michael Fortin <mikee@m410.us> wrote:
>> Hi,
>> 
>> I've been working on a scala based api for cassandra.  I've built it directly on
top of thrift.  I'm having a problem getting a slice of a superColumn.  When I get a columnOrSuperColumn
back, and call 'cos.super_column.name' and deserialize the bytes I'm not getting the expected
output.
>> 
>> Here's whats in cassandra
>> -------------------
>> RowKey: key
>> => (super_column=super-col-0,
>>     (column=column, value=76616c756530, timestamp=1300330948240)
>>     (column=column1, value=76616c756530, timestamp=1300330948244))
>> ….
>> 
>> and this is the deserialized string
>> 
>> ?       get_slice                    super-col-0              column       value0
>>     .?æ?        column1       value0
>>     .?æ?            super-col-1              column       value1
>>     .?æ?        column1       value1
>>     .?æ?            super-col-2              column       value2
>>     .?æ?        column1       value2
>>     .?æ?            super-col-3              column       value3
>>     .?æ?        column1       value3
>>     .?æ?
>> 
>> I would expect
>> super-col-0
>> 
>> Any ideas on what I'm doing wrong?
>> 
>> Thanks,
>> Mike


Mime
View raw message