hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8152) Avoid creating empty reference file when splitkey is outside the range of a store file
Date Wed, 27 Mar 2013 18:27:16 GMT

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

Sergey Shelukhin commented on HBASE-8152:
-----------------------------------------

{quote}
-  byte[] SPLITKEY = new byte[] { (LAST_CHAR-FIRST_CHAR)/2, FIRST_CHAR};
+  byte[] SPLITKEY = new byte[] { (LAST_CHAR + FIRST_CHAR)/2, FIRST_CHAR};
{quote}
How did this work before?
{quote}
-      assertTrue(count == 0);
+      

+    }
+    else {
{quote}
Nit: whitespace, linebreaks.

bq. +      byte[] splitKey = KeyValue.createLastOnRow(splitRow).getKey();
Nit^2: no need to create array copy (getKey), could just create KV like here, and then use
getBuffer/getKeyOffset/... in compares.


Both of the compares are exclusive. Split key can only be in one file, right? So one of them
should be inclusive unless I'm missing something.

                
> Avoid creating empty reference file when splitkey is outside the range of a store file
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-8152
>                 URL: https://issues.apache.org/jira/browse/HBASE-8152
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filesystem Integration, HFile
>    Affects Versions: 0.94.5
>            Reporter: clockfly
>            Assignee: clockfly
>            Priority: Trivial
>             Fix For: 0.94.7
>
>         Attachments: hbase-8152.0.94patch.v2, hbase-8152.patch0.94
>
>
> When splitting a store file, if the split key is before the first key, or greater than
the last key, then only one reference file should be created.
> Currently, two reference file will be created.

--
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