sebgiroux / Cassandra-Cluster-Admin

Manage your Cassandra cluster in your Web browser!
http://www.wajam.com
MIT License
206 stars 66 forks source link

Browsing column families with LexicalUUID as key does not work #8

Open victorblaga opened 12 years ago

victorblaga commented 12 years ago

I cannot browse the records of a Column Family that have a UUID as key. Trying to browse for records simply does not display anything (as if the Column Family would be empty).

I'm using XAMPP for Linux, version 1.7.7. Cassandra version is 1.0.6. The Column Family that I'm trying to browse has only the key_validation_class attribute set to LexicalUUIDType. I've inserted the records using Ruby and the Cassandra Twitter Gem.

sebgiroux commented 12 years ago

Thanks for the detailed bug report!

I have never work with LexicalUUID myself to be honest. I might have time to check this tomorrow or next week but in the mean time, if you want to help me investigate this that would be awesome! I'm really not sure how to insert stuff in a CF with that type.

victorblaga commented 12 years ago

Hi,

I think officially Cassandra accepts UUID's as defined by the standard http://tools.ietf.org/html/rfc4122. According to the Cassandra Wiki, Version 1 UUID is used for TimeUUIDType and one can enter any version of UUID for LexicalUUIDType values (http://en.wikipedia.org/wiki/Universally_Unique_Identifier).

I haven't checked your source code, because I'm not really familiar with PHP, but I guess you need to put some extra effort into parsing and/or entering UUID values.

Another related issue that I also observed is that when a record has a column with a UUID name or value it is not being displayed correctly (some question marks and strange characters appear, probably due to a lack of encoding correction).

I'll try to give it a try as a fix, though I might be slow due to my lack of PHP knowledge.

sebgiroux commented 12 years ago

Cool!

Well, actually if you want to send me a zip of your data (or if its too big, you can just create me a sample CF with a few rows in it or something), that would probably be enough for me to fix the problem :)

Thank you!

jovekuang commented 12 years ago

Could it be the same issue I just filed at https://github.com/sebgiroux/Cassandra-Cluster-Admin/issues/18?

The value with dashes was generated by java.util.UUID.randomUUID().toString().