No, we can't scan in reverse. I don't think it's possible to do so with the components we have today - there's no previous method on mapfile, only next. Out of curiosity, hat's the use case for getting the last N records in the table?

-Bryan

On Apr 29, 2008, at 8:08 AM, Zhou Wei wrote:


Hm, tricky. You don't have the scan the whole table - just the last region. You can find out what the start key of the last region is by using HTable#getStartKeys. If this isn't an acceptable solution, we might be able to think up a way to get the last real row of a table more efficiently.
Actually, I need to obtain the 3333 rows starting from the last row rather than the first row. So I wonder is it possible to obtain a scanner that scan in the reverse direction.
I.e. Starting from the last row to the first row.

Zhou

-Bryan

On Apr 28, 2008, at 7:53 PM, Zhou Wei wrote:

Hi

I want to find out the maximum value of the row id of a table.
Is there a simple and efficient way to do this without scan through the
whole table starting from the first row?

Thanks.

Zhou





Reply via email to