hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Spaggiari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11990) Make setting the start and stop row for a specific prefix easier
Date Tue, 16 Sep 2014 17:13:33 GMT

    [ https://issues.apache.org/jira/browse/HBASE-11990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135748#comment-14135748
] 

Jean-Marc Spaggiari commented on HBASE-11990:
---------------------------------------------

Thanks for patch [~nielsbasjes].

{code}
+   * Note: In order to make stopRow inclusive add 1
+   * (or use {@link #setStopRowInclusive(byte[])} to do it for you)
{code}

This is not clear to me. Can we say something like increment the last byte or something like
that instead of "add 1"? Or "add one to this or that"?

Also, on the test, can you add cases where rows are empty?

Everything else looks good to me. 

> Make setting the start and stop row for a specific prefix easier
> ----------------------------------------------------------------
>
>                 Key: HBASE-11990
>                 URL: https://issues.apache.org/jira/browse/HBASE-11990
>             Project: HBase
>          Issue Type: New Feature
>          Components: Client
>            Reporter: Niels Basjes
>         Attachments: HBASE-11990-20140916.patch
>
>
> If you want to set a scan from your application to scan for a specific row prefix this
is actually quite hard.
> As described in several places you can set the startRow to the prefix; yet the stopRow
should be set to the prefix '+1'
> If the prefix 'ASCII' put into a byte[] then this is easy because you can simply increment
the last byte of the array. 
> But if your application uses real binary rowids you may run into the scenario that your
prefix is something like 
> {code}{ 0x12, 0x23, 0xFF, 0xFF }{code} Then the increment should be {code}{ 0x12, 0x24,
0x00, 0x00 }{code}
> I have prepared a proposed patch that makes setting these values correctly a lot easier.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message