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-9583) add document for getShortMidpointKey
Date Tue, 24 Sep 2013 20:49:05 GMT

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

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

Some might want to take a look took because I'm neither native English, but here is my review:
{code}
Before HBASE-7845, while finalizing a data block (e.g. reach blocksize setting or close file),
HBase picks up the start key of current data block as an index entry adding into the current
leaf index block, however in some way, indexing on the stop key of previous data block can
be treated as a better choice (see HBASE-5987 and HBASE-4443 for more details). It's not an
easy thing to change this behavior without refactoring lots of low level codes. HBASE-7845
implemented the getShortMidpointKey method which is similar with Leveldb's ByteWiseComparatorImpl::FindShortestSeparator()
and FindShortSuccessor(). The core of getShortMidpointKey is to generate a "virtual" key bigger
than the stop key of previous data block, and smaller or equal to the start key of the current
data block. The gap between the stop key of previous data block and the "virtual" key is as
small as possible. Also we make sure that the length of the "virtual" key is as small as possible.
e.g. the stop key of previous block is "the quick brown fox", the start key of current block
is "the who", then getShortMidpointKey can generate a "virtual" key like "the r" as the new
index entry. It brings two benefits at least:1) Reduce the hfile data index size. 2) Avoid
extra seeking to the previous data block request if the target key is in the range of ["virtual
key","start key of current block"]
{code}
                
> add document for getShortMidpointKey
> ------------------------------------
>
>                 Key: HBASE-9583
>                 URL: https://issues.apache.org/jira/browse/HBASE-9583
>             Project: HBase
>          Issue Type: Task
>          Components: HFile
>    Affects Versions: 0.98.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>         Attachments: HBase-9583.txt
>
>
> add the faked key to documentation http://hbase.apache.org/book.html#hfilev2

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message