hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Liochon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13272) Get.setClosestRowBefore() breaks specific column Get
Date Fri, 20 Mar 2015 12:31:38 GMT

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

Nicolas Liochon commented on HBASE-13272:

The HTable#getRowOrBefore does a get#setClosestRowBefore(true);
Yeah, I should have deprecated both. I think setClosestRowBefore is really old, but may be
I'm wrong.

>From the code
- It seems it's not used in HBase now
- I have not found a test as well.
- it seems it does not work if you're hitting a region boundary (i.e. the closest_row_before
is in another region).
- It's limited to single family as well (RSRpcServices.java)
            "get ClosestRowBefore supports one and only one family now, not "
              + get.getColumnCount() + " families");

I think this can be replaced by the reverseScanner, hopefully reverseScanner covers more usages.

My guess is that it leaked getRowOrBefore  was purely internal and got deprecated in 0.92:
   * @deprecated As of version 0.92 this method is deprecated without
   * replacement. Since version 0.96+, you can use reversed scan.
   * getRowOrBefore is used internally to find entries in hbase:meta and makes
   * various assumptions about the table (which are true for hbase:meta but not
   * in general) to be efficient.

My guess is that Get#setClosestRowBefore was there only for the meta table and has been forgotten
on the deprecation path.

Now I'm not against a fix, we're open source :-) and anyway we can't remove the feature in
less than two hbase releases.
But from the client code point of view using the reverse scanner seems safer. imho setClosestRowBefore
should be deprecated as soon as possible: very ad-hoc, not used in the internal code, not
tested, fails on cross boundaries calls, fails on multiple families, and this jira as a bounty:
these are good reasons imho.

> Get.setClosestRowBefore() breaks specific column Get
> ----------------------------------------------------
>                 Key: HBASE-13272
>                 URL: https://issues.apache.org/jira/browse/HBASE-13272
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Priority: Trivial
> Via [~larsgeorge]
> Get.setClosestRowBefore() is breaking a specific Get that specifies a column. If you
set the latter to "true" it will return the _entire_ row!

This message was sent by Atlassian JIRA

View raw message