2

1) Inserting a column

DynamicComposite dc = new DynamicComposite();
dc.add(0,TimeUUIDUtils.getUniqueTimeUUIDinMillis());

2) Trying to query the column between given time range using a SliceQuery

UUID afterUUID = TimeUUID.getTimeUUID((new Date (2012, 7, 17, 24, 0).getTime())); 
    UUID beforeUUID = TimeUUID.getTimeUUID((new Date (2012, 7, 20, 24, 0).getTime())); 
    startRange.add(0, afterUUID);
    endRange.addComponent(0,beforeUUID, UUIDSerializer.get(), "TimeUUIDType", AbstractComposite.ComponentEquality.GREATER_THAN_EQUAL);

executing the code on 7/19 so the column should match but nothing.

Any help is appreciated.

1
  • I am using a Long with just a System.currentTimeMillis() for now. Till I find a problem to the original solution.
    – Gmu
    Jul 24, 2012 at 14:02

1 Answer 1

0

Cassandra is using UTC as System.currentTimeInMillis() also does. When querying with time in UTC, your queries should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.