hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Duxbury (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HBASE-390) Add getClosestBefore method to MapFile.Reader
Date Mon, 04 Feb 2008 19:05:08 GMT

     [ https://issues.apache.org/jira/browse/HBASE-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Bryan Duxbury resolved HBASE-390.

    Resolution: Duplicate

This has already been done in HADOOP-2532.

> Add getClosestBefore method to MapFile.Reader
> ---------------------------------------------
>                 Key: HBASE-390
>                 URL: https://issues.apache.org/jira/browse/HBASE-390
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: Bryan Duxbury
> I have been taking a look at HADOOP-2443, using a sparse cache of HBase regions. My plan
was to implement this ticket by doing point searches in the HBase ROOT and META regions as
need be. In order to facilitate this, I need a method that will get me the closest key to
a given key, but in the less than direction. That is, it should find the key that either matches
exactly or is precisely prior to where it should be. This is necessary because in order to
find where a given row key belongs in an HBase table, you need to compare it to the start
keys of all the regions. 
> The problem lies in the fact that MapFile.Reader, which stores the ROOT and META tables,
only support searching in the greater-than-or-equal-to sense. With this kind of search, we
would always end up exactly one position behind the region we're actually looking for. Since
there is no back() method to readjust, this method would not help us. Basically our only option
becomes doing a linear search through the MapFile to find the key we're looking for, which
would carry a significant performance penalty in large regions.
> I propose adding a getClosestBefore method that returns the key immediately before the
the switch from less than or equal to greater than, thus capturing the needed key/value. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message