Re: how to - get last inserted row id

2008-02-25 Thread cure
On Mon, 25 Feb 2008, Bryan Duxbury wrote: > > It seems to me that the only time you should use random GUIDs as row > keys is if you don't care about the keys or the ordering of rows, > since they're sorted lexically, and GUIDs are distributed randomly. > If you want to find the last 100 inserted

Re: how to - get last inserted row id

2008-02-25 Thread cure
On Mon, 25 Feb 2008, stack wrote: > > P.S. Would be interested in hearing more about our 500M cluster if you > have the time to describe: # of regionservers, data size, etc. > > I want to create implementation of "giant forum" engine based on hbase, or other column-based database, and now we a

Re: how to - get last inserted row id

2008-02-25 Thread stack
There is no 'order by' in hbase. The best that I can come up with answering your question is to get the last region in the table to find its start key and then start scanning until you run off the end of the table. In pseudo code: HTable t = new HTable(conf, YOUR_TABLE_NAME); Text [] startKe

Re: how to - get last inserted row id

2008-02-25 Thread Bryan Duxbury
There is no such thing as last inserted row id in HBase, unless you can produce it from your own application. There's no autoincrement- style magic ID in HBase, just the row keys you inserted with. Also, the rows are already sorted by the key you used to write the rows in the first place. Un

how to - get last inserted row id

2008-02-25 Thread cure
Hi Sorry for my maby stupid question, but i can't find answer. Is there any way to get last inserted row id ? i have realy big table - now there is about 480 000 000 rows and i need to get last 100 inserted. maby there is some fuctionality like sql "order by" ? unfortunately m