[
https://issues.apache.org/jira/browse/HBASE-5864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261319#comment-13261319
]
ramkrishna.s.vasudevan commented on HBASE-5864:
-----------------------------------------------
@Lars
In a file that has only one level of index, if we need to find the midkey(
during external split operation) we should ideally get the midkey from
{code}
else {
// The middle of the root-level index.
midKey = blockKeys[(rootCount - 1) / 2];
}
{code}
Because the midLeafBlockOffset should be -1.
But in this problem that we faced the midLeafBlockOffset is wrongly set with
some value and hence the midkey() tries to
{code}
if (midLeafBlockOffset >= 0) {
if (cachingBlockReader == null) {
throw new IOException("Have to read the middle leaf block but " +
"no block reader available");
}
// Caching, using pread, assuming this is not a compaction.
HFileBlock midLeafBlock = cachingBlockReader.readBlock(
midLeafBlockOffset, midLeafBlockOnDiskSize, true, true, false,
BlockType.LEAF_INDEX);
{code}
That is where the problem happens as per this bug. For a single level index
file there should not be any midLeafBlockOffset. Correct me if am wrong.
> Error while reading from hfile in 0.94
> --------------------------------------
>
> Key: HBASE-5864
> URL: https://issues.apache.org/jira/browse/HBASE-5864
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 0.94.0
> Reporter: Gopinathan A
> Assignee: ramkrishna.s.vasudevan
> Priority: Critical
> Fix For: 0.94.0
>
> Attachments: HBASE-5864_1.patch, HBASE-5864_2.patch,
> HBASE-5864_test.patch
>
>
> Got the following stacktrace during region split.
> {noformat}
> 2012-04-24 16:05:42,168 WARN org.apache.hadoop.hbase.regionserver.Store:
> Failed getting store size for value
> java.io.IOException: Requested block is out of range: 2906737606134037404,
> lastDataBlockOffset: 84764558
> at
> org.apache.hadoop.hbase.io.hfile.HFileReaderV2.readBlock(HFileReaderV2.java:278)
> at
> org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.midkey(HFileBlockIndex.java:285)
> at
> org.apache.hadoop.hbase.io.hfile.HFileReaderV2.midkey(HFileReaderV2.java:402)
> at
> org.apache.hadoop.hbase.regionserver.StoreFile$Reader.midkey(StoreFile.java:1638)
> at
> org.apache.hadoop.hbase.regionserver.Store.getSplitPoint(Store.java:1943)
> at
> org.apache.hadoop.hbase.regionserver.RegionSplitPolicy.getSplitPoint(RegionSplitPolicy.java:77)
> at
> org.apache.hadoop.hbase.regionserver.HRegion.checkSplit(HRegion.java:4921)
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.splitRegion(HRegionServer.java:2901)
> {noformat}
--
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