incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Kutcharian <>
Subject Re: Any way to get different unique time UUIDs for the same time value?
Date Wed, 30 Mar 2011 17:08:44 GMT
Hi Roshan,

You probably want to look at Twitter's Snowflake:

There's also another Java variant:

- Drew

On Mar 30, 2011, at 6:08 AM, Roshan Dawrani wrote:

> Hi,
> Is there any way I can get multiple unique time UUIDs for the same timestamp value -
I mean, the UUIDs that are same in their time (most significant bits), but differ in their
least significant bits?
> The least significant bits added by me.prettyprint.cassandra.utils.TimeUUIDUtils seem
to be a fixed value based on mac/ip address, which makes sure that I get the same UUID for
a timestamp value, everytime I ask.
> I need the "(timestamp): <some value>" kind of columns that need to be sorted by
time, and I wanted to use TimeUUID to use column sorting that comes out-of-the-box, but the
problem is that I can get multiple values for the same timestamp.
> So, I am looking for some way where the time portion is same, but the other UUID half
is different so that I can safely store "1 time UUID: 1 value".
> Any help there is appreciated.
> -- 
> Roshan
> Blog:
> Twitter: @roshandawrani
> Skype: roshandawrani

View raw message