You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Nathan Schile (JIRA)" <ji...@apache.org> on 2016/03/01 04:11:18 UTC

[jira] [Commented] (HBASE-15357) TableInputFormatBase getSplitKey does not handle signed bytes correctly

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

Nathan Schile commented on HBASE-15357:
---------------------------------------

For reference the current code returns a split point of -4, when the split point should be 124.

{code}
 byte[] start = { 120 }; // 'x'
 byte[] end = { -128 }; // '€'
 byte[] splitPoint = { -4 };
{code}

> TableInputFormatBase getSplitKey does not handle signed bytes correctly
> -----------------------------------------------------------------------
>
>                 Key: HBASE-15357
>                 URL: https://issues.apache.org/jira/browse/HBASE-15357
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>            Reporter: Nathan Schile
>            Assignee: Nathan Schile
>         Attachments: HBASE-15357.patch
>
>
> When auto-balance is enabled in TableInputFormatBase and the table key is a binary key, the getSplitKey method does not function correctly for signed bytes. The proposed solution it to utilize org.apache.hadoop.hbase.util.Bytes#split method to find the split key. org.apache.hadoop.hbase.util.Bytes#split is stated to be a expensive operation, so if another solution is preferred, that is fine. In addition, handling of a split key that is equal to the TableSplit end key is added to calculateRebalancedSplits.



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