I wonder if that would work.
Looking at ServerCallable:
  public void instantiateServer(boolean reload) throws IOException {
    this.location = connection.getRegionLocation(tableName, row, reload);

It seems empty byte array would correspond to the first region, instead of
the last.

On Tue, Mar 1, 2011 at 9:08 PM, Stack <st...@duboce.net> wrote:

> Oh, forgot, there is
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.html#getRowOrBefore(byte[]
> ,
> byte[])  See what happens if you pass it the empty byte array; i.e.
> the last row in a table (last logical row is an empty byte array as is
> first logical row)
>
> St.Ack
>
> On Tue, Mar 1, 2011 at 8:58 PM, Ted Yu <yuzhih...@gmail.com> wrote:
> > Weishung:
> > For max, you can enumerate the regions for your table. Start the scan
> from
> > the first row in the last region.
> >
> > On Tue, Mar 1, 2011 at 8:51 PM, Stack <st...@duboce.net> wrote:
> >
> >> On Tue, Mar 1, 2011 at 2:44 PM, Ted Yu <yuzhih...@gmail.com> wrote:
> >> > For min, you can write your own filter which extends FilterBase so
> that
> >> the
> >> > scan stops after seeing the first row.
> >> >
> >>
> >> Or just start the scan at the a row whose name is the empty byte array
> >> and kill the scan after the first return; the first return will be the
> >> first row in table.
> >>
> >> I don't know how to get the last row in a table, easily.
> >>
> >> St.Ack
> >>
> >
>

Reply via email to