You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/12/18 18:29:00 UTC
[jira] [Commented] (HBASE-19551) hbck -boundaries doesn't work
correctly
[ https://issues.apache.org/jira/browse/HBASE-19551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16295386#comment-16295386 ]
Ted Yu commented on HBASE-19551:
--------------------------------
getKey() call does this:
{code}
public byte[] getKey() {
int keylength = getKeyLength();
byte[] key = new byte[keylength];
System.arraycopy(this.bytes, getKeyOffset(), key, 0, keylength);
{code}
The returned byte array isn't prefixed by length.
> hbck -boundaries doesn't work correctly
> ---------------------------------------
>
> Key: HBASE-19551
> URL: https://issues.apache.org/jira/browse/HBASE-19551
> Project: HBase
> Issue Type: Bug
> Reporter: Toshihiro Suzuki
> Assignee: Toshihiro Suzuki
>
> Currently, in HBaseFsck#checkRegionBoundaries(), it seems like keys from reader.getFirstKey() and reader.getLastKey() are directly compared by ByteArrayComparator:
> https://github.com/apache/hbase/blob/9d0c7c6dfbcba0907cbbc2244eac570fcc4d58a5/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java#L864-L865
> https://github.com/apache/hbase/blob/9d0c7c6dfbcba0907cbbc2244eac570fcc4d58a5/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java#L869-L870
> This is not correct because the keys consist of a key length and key itself. We should compare rowkeys or the only key itself (by removing a key length).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)