hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Graham <billgra...@gmail.com>
Subject Re: min, max
Date Thu, 03 Mar 2011 16:50:47 GMT
This first region starts with an empty byte[] and the last region ends
with one. Those in between have non-empy byte[]s to specify their
boundaries.

On Thu, Mar 3, 2011 at 7:18 AM, Weishung Chung <weishung@gmail.com> wrote:
> Thanks, Stack!
>
> Got a few more questions.
>
> Does every region start with an empty byte[] and end with one too? Also, if
> i get all the region infos using
> Map<HRegionInfo, HServerAddress> map = table.getRegionsInfo();
> Would these region infos be sorted according to the keys? If so, I would
> just get the last region info from the last element in the map. (trying to
> get last row)
>
> Thank you,
>
> On Wed, Mar 2, 2011 at 10:39 PM, Stack <stack@duboce.net> wrote:
>
>> On Wed, Mar 2, 2011 at 8:30 PM, Weishung Chung <weishung@gmail.com> wrote:
>> > I tried the method as Stack suggested to find the first row, it works :)
>> I
>> > have yet to learn about Filter and would like to use it too. I was
>> wondering
>> > which method would give a better performance.
>>
>> The non-filter version I'd say (smile).
>>
>>
>> > As for the max, I will try it out tomorrow.
>> > I thought I could use the getEndKeys() method but it doesn't work as I
>> > expected. It returns empty byte[]
>> > public byte[][] getEndKeys() throws IOException {
>> >
>> >     return getStartEndKeys().getSecond();
>> >
>> >   }
>>
>> Yeah, this is the 'endkey' on the last region.  You want the one just
>> before that I take it.
>>
>> St.Ack
>>
>

Mime
View raw message