hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de Souza Medeiros Andre <andre.medei...@aalto.fi>
Subject RE: HTable.getEndKeys() returning empty results
Date Thu, 08 Mar 2012 19:50:54 GMT
Thanks for the answer.
This is quite confusing though, what is the point of having a method to retrieve the last
key if we know that anyway it will be an empty byte array?

Or does this happen only with one-region tables?

Any way, is there some way of getting the last _data_ row of a table? Other than scanning
the whole thing...

- Andre Medeiros
From: saint.ack@gmail.com [saint.ack@gmail.com] on behalf of Stack [stack@duboce.net]
Sent: Thursday, March 08, 2012 18:48
To: user@hbase.apache.org
Subject: Re: HTable.getEndKeys() returning empty results

On Thu, Mar 8, 2012 at 8:25 AM, de Souza Medeiros Andre
<andre.medeiros@aalto.fi> wrote:
> Hi all,
> Has someone had problems with HTable.getEndKeys() method? In my application it returns
an array of byte[], but the first (and only) byte[] is empty, so essentially it's telling
me that the (single) region has no end key.
> The table has 3 rows and I'm running standalone HBase 0.90.4 CDH3u3 on my local machine.
Moreover, the call getEndKeys() is executed immediately after I put rows in the table.
> Do I need to wait until the .META. table gets updated with the regions' end row keys?
> Does HTable.getEndKeys() work only in a fully distributed mode?
> Is there any other way of getting the last row in a table? (this is my objective after

An empty byte array is the last key in a table of one region only.  An
hbase table uses empty byte array as both the start and end row
signifier as per the bigtable paper (I don't see this explicitly
called out in the reference guide but I'm probably not looking in
right place).


View raw message