cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse McConnell <jesse.mcconn...@gmail.com>
Subject Re: Question about TimeUUIDType
Date Fri, 23 Apr 2010 22:53:48 GMT
try LexicalUUIDType, that will distinguish the secs correctly

imo based on the existing impl (last I checked at least) TimeUUIDType
was equivalent to LongType

cheers,
jesse

--
jesse mcconnell
jesse.mcconnell@gmail.com



On Fri, Apr 23, 2010 at 17:51, Lucas Di Pentima <lucas@di-pentima.com.ar> wrote:
> Hello,
>
> I'm using Cassandra 0.6.1 with ruby library
>
> I want to log events on a CF like this:
>
> Events = { // CF CompareWith: TimeUUIDType
>    SomeEventID : { // Row
>        uuid_from_unix_timestamp : event_data,
>        ...
>    }
> }
>
> I receive event data with a UNIX timestamp (nr of seconds passed since some date on 1970),
so I would do something like:
>
> db = Cassandra.new('Keyspace')
> db.insert('Events', SomeEventID, {SimpleUUID:UUID.new(Time.at(unix_timestamp)} =>
event_data)
>
> My first question was: What happens if I have more than one event at the same second?
I tried this on irb console and checked that TimeUUIDs are different.
>
> So, my second question is: How different TimeUUIDs generated from the same UNIX timestamp
are going to be ordered in the ColumnFamily?
>
> Thanks in advance!!
> --
> Lucas Di Pentima - Santa Fe, Argentina
> Jabber: lucas@di-pentima.com.ar
> MSN: ldipenti75@hotmail.com
>
>
>
>
>

Mime
View raw message