Lazy programmer alert. 🙂
Cassandra stores column values as bytes (Java example). Specifying a LongType comparator compares those bytes as a long. I want the value of a long into a Cassandra-friendly byte[]. How? I poked around for awhile. I think you people can help me faster.
EDIT:
Both Alexander and Eli’s answers agreed with this reverse transformation. Thanks!
Here is cut and paste from java 6
DataOutputStream.writeLongHere are modifications for your case