It looks to me like they use LongString to sort primarily by the Long, then secondarily by the String portion of a "LongString". I believe all you would need to do to implement this is to add a class to src/java/org/apache/cassandra/db/marshal . I would recommend copying LongType to start, then adjust the compare() and getString() methods. As far as using this for column names goes, I don't think there's anything else to it. I'm not sure about row keys.
Hi,I came across this presentation (link below) by Sarkissian (no first name given) at Digg about their use of Cassandra. On page 27 he says "Custom comparators turn out to be key" and mentions in the next few slides a LongString (actually once a LongString the other times a LongSting, but I'm assuming that's just a typo). Most of my CFs use some long strings (urls) either as rows or column names, and I'm keen to know more about what they may have learned. Does anyone know if they contributed this class to back to Cassandra or can anyone guess at how long strings might need to be handled differently to what the standard string comparator does?Thanks in advance,Kevin.