You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nd...@apache.org on 2014/10/01 02:29:24 UTC
git commit: HBASE-12123 Failed assertion in BucketCache after 11331
Repository: hbase
Updated Branches:
refs/heads/master b5783795c -> 7a064f96b
HBASE-12123 Failed assertion in BucketCache after 11331
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7a064f96
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7a064f96
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7a064f96
Branch: refs/heads/master
Commit: 7a064f96ba5bc6a6ece956cb51c28eb5fb44e567
Parents: b578379
Author: Nick Dimiduk <nd...@apache.org>
Authored: Tue Sep 30 15:33:34 2014 -0700
Committer: Nick Dimiduk <nd...@apache.org>
Committed: Tue Sep 30 17:00:52 2014 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/7a064f96/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index 24b51c3..73a0ca2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -1235,11 +1235,13 @@ public class BucketCache implements BlockCache, HeapSize {
bucketEntry.setDeserialiserReference(data.getDeserializer(), deserialiserMap);
try {
if (data instanceof HFileBlock) {
- ByteBuffer sliceBuf = ((HFileBlock) data).getBufferReadOnlyWithHeader();
+ HFileBlock block = (HFileBlock) data;
+ ByteBuffer sliceBuf = block.getBufferReadOnlyWithHeader();
sliceBuf.rewind();
- assert len == sliceBuf.limit() + HFileBlock.EXTRA_SERIALIZATION_SPACE;
+ assert len == sliceBuf.limit() + HFileBlock.EXTRA_SERIALIZATION_SPACE ||
+ len == sliceBuf.limit() + block.headerSize() + HFileBlock.EXTRA_SERIALIZATION_SPACE;
ByteBuffer extraInfoBuffer = ByteBuffer.allocate(HFileBlock.EXTRA_SERIALIZATION_SPACE);
- ((HFileBlock) data).serializeExtraInfo(extraInfoBuffer);
+ block.serializeExtraInfo(extraInfoBuffer);
ioEngine.write(sliceBuf, offset);
ioEngine.write(extraInfoBuffer, offset + len - HFileBlock.EXTRA_SERIALIZATION_SPACE);
} else {