get_range_slice() api call allows you to iterate of the keys in the DB. Cheers
----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 18 Jun 2011, at 05:00, karim abbouh wrote: > is there any way to remember the keys (rowId) inserted in cassandra database? > B.R > > De : Jonathan Ellis <jbel...@gmail.com> > À : user@cassandra.apache.org > Cc : karim abbouh <karim_...@yahoo.fr> > Envoyé le : Mercredi 15 Juin 2011 18h05 > Objet : Re: last record rowId > > You're better served using UUIDs than numeric row IDs for surrogate > keys. (Of course natural keys work fine too.) > > On Wed, Jun 15, 2011 at 9:16 AM, Utku Can Topçu <u...@topcu.gen.tr> wrote: > > As far as I can tell, this functionality doesn't exist. > > > > However you can use such a method to insert the rowId into another column > > within a seperate row, and request the latest column. > > I think this would work for you. However every insert would need a get > > request, which I think would be performance issue somehow. > > > > Regards, > > Utku > > > > On Wed, Jun 15, 2011 at 11:14 AM, karim abbouh <karim_...@yahoo.fr> wrote: > >> > >> in my java application,when we try to insert we should all the time know > >> the last rowId > >> in order the insert the new record in rowId+1,so for that we should save > >> this rowId in a file > >> is there other way to know the last record rowId? > >> thanks > >> B.R > > > > > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com > >