thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "themanatuf@juno.com" <themana...@juno.com>
Subject C++ TimeUUID for Column Name
Date Tue, 17 Aug 2010 17:27:15 GMT
I have a ColumnFamily in Cassandra that is of Super type and each SuperColumn name is a TimeUUID.
I've had no problem using TimeUUID as the SuperColumn name until now...

I've looked at the thrift code and I see all of the writeBinary functions expect a std::string
as the input which is perfectly fine for everything EXCEPT TimeUUID types. The TimeUUID I'm
trying to insert has a 0x00 character within it (and apparently that is valid for a TimeUUID).
The string representation of my TimeUUID is:

cb0b6a00-aa51-11df-9509-7071bc4c56eb

Just to make sure this is accurate I wrote a quick C++ test using uuid_parse and I was able
to get the valid time back:

2010/08/17 18:50:12 (format: %Y/%m/%d %H:%M:%S)

The 16-byte hex representation of this UUID is:

0xCB 0x0B 0x6A 0x00 0xAA 0x51 0x11 0xDF 0x95 0x09 0x70 0x71 0xBC 0x4C 0x56 0xEB

When trying to add this SuperColumn I'm obviously getting the error that UUID's must be exactly
16 bytes. When the UUID is being converted to a string, the copy looks to be stopping after
the 3rd byte.

Is there any way around this? This is kind of a show-stopper for me and I can't figure out
how to workaround it... Any help would be MUCH appreciated.


____________________________________________________________
Get Free Email with Video Mail & Video Chat!
http://www.juno.com/freeemail?refcd=JUTAGOUT1FREM0210

Mime
View raw message