You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Prakash Khemani (Created) (JIRA)" <ji...@apache.org> on 2012/01/28 01:25:10 UTC
[jira] [Created] (HBASE-5296) confusing code in
HFileBlockIndex.seekToBlockIndex()
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
Assignee: Mikhail Bautin
{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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira