hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: how to reverse an integer for rowkey?
Date Thu, 27 Mar 2014 12:46:20 GMT
Reverse scan is slower compared to forward scan. 
Depending on access pattern, storing int field in decreasing order may be desirable. 

Cheers

On Mar 27, 2014, at 4:54 AM, haosdent <haosdent@gmail.com> wrote:

> 0.94 also support reverse scan.
> 
> https://issues.apache.org/jira/browse/HBASE-4811?focusedCommentId=13839323&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13839323
> 
> 
> On Thu, Mar 27, 2014 at 4:58 PM, Li Li <fancyerii@gmail.com> wrote:
> 
>> great feature but I am using 0.94 now
>> 
>> On Thu, Mar 27, 2014 at 4:49 PM, haosdent <haosdent@gmail.com> wrote:
>>> How about Reverse Scan? https://issues.apache.org/jira/browse/HBASE-4811
>>> 
>>> 
>>> On Thu, Mar 27, 2014 at 4:24 PM, Li Li <fancyerii@gmail.com> wrote:
>>> 
>>>> my rowkey is <strField,intField>
>>>> I want to scan it by decreasing order of the int field, how to make it
>>>> reversed?
>>>> if the row key is Bytes.toBytes(intField) + Bytes.toBytes(strField),
>>>> then the order is increasing.
>>>> one solution is replace intField with -intField. but if
>>>> intField==Integer.MIN_VALUE, what will happen?
>>> 
>>> 
>>> 
>>> --
>>> Best Regards,
>>> Haosdent Huang
> 
> 
> 
> -- 
> Best Regards,
> Haosdent Huang

Mime
View raw message