hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject git commit: HBASE-12123 Failed assertion in BucketCache after 11331
Date Wed, 01 Oct 2014 00:33:45 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 904278888 -> c5d7fcde9


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/c5d7fcde
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c5d7fcde
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c5d7fcde

Branch: refs/heads/0.98
Commit: c5d7fcde980e7b366a06ae713835ca8923263eec
Parents: 9042788
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Tue Sep 30 15:33:34 2014 -0700
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Tue Sep 30 15:39:27 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/c5d7fcde/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 35fedfe..08a6602 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
@@ -1236,11 +1236,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 {


Mime
View raw message