Re: How to generate 'unique' identifiers for use in Cassandra

2010-04-27 Thread Shuge Lee
import uuid unique_key = uuid.uuid4() if you using Python. 2010/4/28 Mark Robson > 2010/4/26 Roland Hänel : >> > Typically, in the SQL world we use things like AUTO_INCREMENT columns >> that >> > let us create a unique key automatically if a row is inserted into a >> table. >> > > auto_increme

Re: How to generate 'unique' identifiers for use in Cassandra

2010-04-27 Thread Mark Robson
> > 2010/4/26 Roland Hänel : > > Typically, in the SQL world we use things like AUTO_INCREMENT columns > that > > let us create a unique key automatically if a row is inserted into a > table. > auto_increment is an antipattern; it adds an extra key which you don't need (usually). If your data has

Re: How to generate 'unique' identifiers for use in Cassandra

2010-04-27 Thread Andriy Bohdan
There's no easy and efficient way to implement auto_increment keys in cassandra. So people usually use UUIDs (http://en.wikipedia.org/wiki/UUID) for this purpose, which is considered globally unique. If you can use one of the fields from your data model as a unique key, better use it instead of ge

Re: How to generate 'unique' identifiers for use in Cassandra

2010-04-26 Thread Miguel Verde
http://wiki.apache.org/cassandra/UUID if you don't need transactional ordering, ZooKeeper or something comparable if you do. 2010/4/26 Roland Hänel > Typically, in the SQL world we use things like AUTO_INCREMENT columns that > let us create a unique key automatically if a row is inserted into a

How to generate 'unique' identifiers for use in Cassandra

2010-04-26 Thread Roland Hänel
Typically, in the SQL world we use things like AUTO_INCREMENT columns that let us create a unique key automatically if a row is inserted into a table. What do you guys usually do to create identifiers for use in Cassandra? Do we only rely on "currentTimeMills() + random()" to create something tha