You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2015/04/11 03:09:15 UTC
[jira] [Resolved] (HBASE-5296) confusing code in
HFileBlockIndex.seekToBlockIndex()
[ https://issues.apache.org/jira/browse/HBASE-5296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Purtell resolved HBASE-5296.
-----------------------------------
Resolution: Incomplete
Assignee: (was: Mikhail Bautin)
> confusing code in HFileBlockIndex.seekToBlockIndex()
> ----------------------------------------------------
>
> Key: HBASE-5296
> URL: https://issues.apache.org/jira/browse/HBASE-5296
> Project: HBase
> Issue Type: Improvement
> Reporter: Prakash Khemani
>
> {code}
> public HFileBlock seekToDataBlock(final byte[] key, int keyOffset,
> int keyLength, HFileBlock currentBlock, boolean cacheBlocks,
> boolean pread, boolean isCompaction)
> throws IOException {
> int rootLevelIndex = rootBlockContainingKey(key, keyOffset, keyLength);
> if (rootLevelIndex < 0 || rootLevelIndex >= blockOffsets.length) {
> return null;
> }
> {code}
> In the above code rootLevelIndex is never greater-than-or-equal-to blockOffsets.length.
> (It can confuse reading of the code if you follow it from StoreFileScanner.seek(kv))
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)